Skip to content

Commit

Permalink
Merge pull request #34 from eurofurence/refactor/net_framework_8
Browse files Browse the repository at this point in the history
Updated dockerfile for .NET 8
  • Loading branch information
Fenrikur authored Apr 7, 2024
2 parents eb6cce7 + 7d0b944 commit 4f427c5
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
FROM alpine:latest
ENV DOTNET_ROOT=/opt/dotnet-sdk
ENV DOTNET_DOWNLOAD_DST=/tmp/dotnet-sdk.tar.gz
ENV DOTNET_DOWNLOAD_SRC=https://download.visualstudio.microsoft.com/download/pr/f8834fef-d2ab-4cf6-abc3-d8d79cfcde11/0ee05ef4af5fe324ce2977021bf9f340/dotnet-sdk-3.1.426-linux-musl-x64.tar.gz
ENV PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
RUN apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib libgdiplus &&\
wget "${DOTNET_DOWNLOAD_SRC}" -O $DOTNET_DOWNLOAD_DST &&\
mkdir -p $DOTNET_ROOT &&\
tar -zxf $DOTNET_DOWNLOAD_DST -C $DOTNET_ROOT &&\
rm $DOTNET_DOWNLOAD_DST
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
COPY ./src /app/src
COPY ./test /app/test
COPY ./ef-app_backend-dotnet-core.sln /app
COPY ./appsettings.json /app
COPY ./firebase.json /app
COPY ./NuGet.config /app
WORKDIR /app
RUN ["dotnet", "restore"]
RUN dotnet build src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj --configuration Release
RUN dotnet publish src/Eurofurence.App.Tools.CliToolBox/Eurofurence.App.Tools.CliToolBox.csproj --output "$(pwd)/artifacts" --configuration Release
RUN dotnet publish src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj --output "$(pwd)/artifacts" --configuration Release --framework netcoreapp3.1
RUN dotnet publish src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj --output "$(pwd)/artifacts" --configuration Release
ENTRYPOINT dotnet artifacts/Eurofurence.App.Server.Web.dll http://*:30001
EXPOSE 30001

0 comments on commit 4f427c5

Please sign in to comment.