Skip to content

Pull latest dotnet 6.0-focal image and add Microsoft Signing Keys to avoid expired signature causing deployment failure #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
14 changes: 12 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# [Choice] .NET version: 6.0-focal, 7.0-bullseye
ARG VARIANT="6.0-focal"
FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT}
#RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg

ARG VARIANT="dev-6.0-focal"
FROM mcr.microsoft.com/devcontainers/dotnet:${VARIANT}

# Add .NET global tools path
ENV PATH $PATH:/home/vscode/.dotnet:/home/vscode/.dotnet/tools

# Import Microsoft Signing Keys
# https://learn.microsoft.com/dotnet/core/install/linux-ubuntu#unable-to-locate--some-packages-could-not-be-installed
RUN sudo apt-get install -y gpg wget \
&& wget https://packages.microsoft.com/keys/microsoft.asc \
&& cat microsoft.asc | gpg --dearmor -o microsoft.asc.gpg \
&& sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ \
&& sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg

# Install additional OS packages
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends software-properties-common
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
dockerfile: Dockerfile
args:
# Update 'VARIANT' to pick a version of .NET: 6.0-focal, 7.0-bullseye
VARIANT: "6.0-focal"
VARIANT: "dev-6.0-focal"

volumes:
- ..:/workspace:cached
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/sql/postCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dacpath=$2
sqlpath=$3

echo "SELECT * FROM SYS.DATABASES" | dd of=testsqlconnection.sql

for i in {1..60};
do
sqlcmd -S localhost -U sa -P $SApassword -d master -i testsqlconnection.sql > /dev/null
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Git will always convert line endings to LF on checkout.
# Used for files that must keep LF endings, even on Windows.
*.sh text eol=lf
2 changes: 1 addition & 1 deletion app/BlazorLibrary/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ApiUrl": "http://127.0.0.1:5001"
"ApiUrl": "http://127.0.0.1:5000"
}