-
Notifications
You must be signed in to change notification settings - Fork 3
/
chat.dockerfile
32 lines (26 loc) · 1.46 KB
/
chat.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# ======================================================================================================================
# 1 - BUILD PROJECTS AND RUN TESTS
# ======================================================================================================================
FROM mcr.microsoft.com/dotnet/sdk:6.0.416-alpine3.18 AS projects
WORKDIR /app
COPY . ./
RUN dotnet restore --disable-parallel
RUN dotnet build -c Release --force
# ======================================================================================================================
# 2 - BUILD DOCKER IMAGE
# ======================================================================================================================
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine3.18
WORKDIR /app
# INSTALL ICU FULL SUPPORT
RUN apk add icu-libs --no-cache
RUN apk add icu-data-full --no-cache
COPY --from=projects "/app/TokanPages.Backend/TokanPages.Backend.Configuration/bin/Release/net6.0" .
COPY --from=projects "/app/TokanPages.Persistence/TokanPages.Persistence.Caching/bin/Release/net6.0" .
COPY --from=projects "/app/TokanPages.Services/TokanPages.Services.BehaviourService/bin/Release/net6.0" .
COPY --from=projects "/app/TokanPages.WebApi/TokanPages.Chat/bin/Release/net6.0" .
COPY --from=projects "/app/TokanPages.WebApi/TokanPages.Chat.Dto/bin/Release/net6.0" .
ARG ENV_VALUE
ENV ASPNETCORE_ENVIRONMENT=${ENV_VALUE}
ENV ASPNETCORE_URLS=http://+:80
EXPOSE 80
ENTRYPOINT ["dotnet", "TokanPages.Chat.dll"]