Skip to content

Commit

Permalink
Update Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Edwards committed Aug 28, 2024
1 parent a8e0b4d commit 4945753
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Crypter.API/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0-preview AS build
WORKDIR /source/

RUN dotnet tool install --global dotnet-ef --version 8.0.*
RUN dotnet tool install --global dotnet-ef --version 9.0.0
ENV PATH="${PATH}:/root/.dotnet/tools"

COPY ../*.sln ./
Expand All @@ -24,7 +24,7 @@ COPY Crypter.DataAccess/. ./Crypter.DataAccess/
RUN dotnet publish Crypter.API --configuration release --no-self-contained /p:TreatWarningsAsErrors=true /warnaserror --output /app/
RUN dotnet-ef migrations bundle --project Crypter.DataAccess --startup-project Crypter.API --configuration release --no-build --target-runtime linux-x64 --output /app/efbundle --verbose

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:9.0-preview AS runtime
WORKDIR /app
COPY --from=build /app ./
CMD ["dotnet", "Crypter.API.dll"]
2 changes: 1 addition & 1 deletion Crypter.Web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ COPY Crypter.Web/. ./Crypter.Web/

RUN dotnet publish Crypter.Web --no-restore --configuration release /p:TreatWarningsAsErrors=true /warnaserror --output /app/

FROM caddy:2.7-alpine AS webhost
FROM caddy:2.8-alpine AS webhost
COPY Crypter.Web/Caddyfile /etc/caddy/Caddyfile
COPY --from=build /app/wwwroot/ /srv/
EXPOSE 80
Expand Down

0 comments on commit 4945753

Please sign in to comment.