forked from mixcore/mix.core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (25 loc) · 959 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
# https://hub.docker.com/_/microsoft-dotnet-sdk
FROM mcr.microsoft.com/dotnet/sdk:5.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:5.0 AS runtime
WORKDIR /app
# COPY --from=node-env /app/Mix.Cms.Web/wwwroot .
COPY --from=build-env /app/Mix.Cms.Web/bin/Release/net5.0/publish .
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