Last active
February 8, 2021 21:22
-
-
Save leocosta/1ea142f82fa6be6f1cee7a0119e0ad29 to your computer and use it in GitHub Desktop.
Dockerfile
This file contains 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
# TO BUILD USE BUILD CONTEXT ON ROOT PROJECT PATH, LIKE: | |
# $ docker build -t $IMAGE_NAME ../../. -f Dockerfile | |
# SPECIFY THE DOCKERFILE, ALWAYS. | |
# Don't update the image | |
# https://stackoverflow.com/questions/56232375/use-grpc-on-dotnet-core-runtime-deps2-2-alpine3-9-got-symbol-not-found-error | |
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1.0-alpine3.10 AS base | |
WORKDIR /out | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.100 AS build | |
WORKDIR /app | |
COPY src/PoiDownloadManager.TcpChannelWorker/ ./PoiDownloadManager.TcpChannelWorker/ | |
COPY src/PoiDownloadManager.TcpChannel/ ./PoiDownloadManager.TcpChannel/ | |
COPY src/PoiDownloadManager.Core/ ./PoiDownloadManager.Core/ | |
COPY src/PoiDownloadManager.Application.Services/ ./PoiDownloadManager.Application.Services/ | |
COPY src/PoiDownloadManager.DataContracts/ ./PoiDownloadManager.DataContracts/ | |
COPY src/PoiDownloadManager.Domain/ ./PoiDownloadManager.Domain/ | |
COPY src/PoiDownloadManager.Infrastructure.Persistence/ ./PoiDownloadManager.Infrastructure.Persistence/ | |
COPY src/PoiDownloadManager.Infrastructure.Queue/ ./PoiDownloadManager.Infrastructure.Queue/ | |
COPY src/PoiDownloadManager.Infrastructure.Integration/ ./PoiDownloadManager.Infrastructure.Integration/ | |
COPY src/PoiDownloadManager.Infrastructure.CrossCutting/ ./PoiDownloadManager.Infrastructure.CrossCutting/ | |
COPY Nuget.config ./ | |
RUN dotnet publish ./PoiDownloadManager.TcpChannelWorker/PoiDownloadManager.TcpChannelWorker.csproj --configfile Nuget.config --runtime alpine-x64 --self-contained -c release -o /out/ -f netcoreapp3.1 | |
FROM base AS runtime | |
RUN apk add --no-cache libc6-compat | |
WORKDIR /out | |
COPY --from=build /out . | |
EXPOSE 6902 | |
ENTRYPOINT ["./PoiDownloadManager.TcpChannelWorker", "--console"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment