-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (26 loc) · 991 Bytes
/
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
# https://hub.docker.com/_/microsoft-dotnet-sdk
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /app
# Copy everything else and build
COPY src/. ./
# RUN dotnet restore Mix.Cms.Web/Mixcore.csproj
RUN dotnet publish Mix.Cms.Web/Mixcore.csproj -c Release
# Build runtime image
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS runtime
WORKDIR /app
# COPY --from=node-env /app/Mix.Cms.Web/wwwroot .
COPY --from=build-env /app/Mix.Cms.Web/bin/Release/net6.0/publish .
ENV ASPNETCORE_URLS=http://+:80
EXPOSE 80
ENTRYPOINT ["dotnet", "mixcore.dll"]
#############################
# PUBLISH NEW IMAGE GUIDELINE
#############################
# Build -> Tag -> Push process
# docker build -t mixcoreimage -f Dockerfile .
# docker tag mixcoreimage mixcore/mix.core:v1.0.0-alpha.1
# docker push mixcore/mix.core:v1.0.0-alpha.1
# docker run -it --rm -p 5000:80 --name aspnetcore_sample mixcoreimage
# Server=db;Database=master;User=sa;Password=P@ssw0rd;
# docker-compose build
# docker-compose up