Last active
October 17, 2019 01:05
-
-
Save kkestell/503f46ef253261f25db5cf20c0f6cf69 to your computer and use it in GitHub Desktop.
.NET Core 3.0 + Alpine 3.9 + PublishSingleFile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BUILD | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-alpine AS build | |
WORKDIR / | |
COPY App/. ./app/ | |
WORKDIR /app | |
RUN dotnet publish -c Release -r linux-musl-x64 -o out /p:PublishSingleFile=true | |
# RUN | |
FROM alpine:3.9 AS runtime | |
ENV LC_ALL en_US.UTF-8 | |
ENV LANG en_US.UTF-8 | |
ENV DOTNET_RUNNING_IN_CONTAINER true | |
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT false | |
RUN apk add --no-cache \ | |
ca-certificates \ | |
icu-libs \ | |
krb5-libs \ | |
libgcc \ | |
libintl \ | |
libssl1.1 \ | |
libstdc++ \ | |
zlib | |
WORKDIR /app | |
COPY --from=build /app/out ./ | |
ENTRYPOINT ["./App"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment