Skip to content

Instantly share code, notes, and snippets.

@2garryn
Created October 7, 2019 09:12
Show Gist options
  • Save 2garryn/4a19e8249d69bcc24b1564a25a156a29 to your computer and use it in GitHub Desktop.
Save 2garryn/4a19e8249d69bcc24b1564a25a156a29 to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release
# Add root certificates
FROM alpine:latest as alpine
RUN apk add -U --no-cache ca-certificates
FROM scratch
WORKDIR /app
COPY --from=build /etc/passwd /etc/passwd
COPY --from=build /app/bin/Release/netcoreapp3.0/linux-musl-x64/publish ./
COPY --from=build /app/bin/Release/netcoreapp3.0/linux-musl-x64/publish ./
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
EXPOSE 5002
ENTRYPOINT ["/app/KRouter2"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment