-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (33 loc) · 1.24 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# https://hub.docker.com/_/microsoft-dotnet-core
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
COPY ./src ./
RUN apt update -yq --allow-releaseinfo-change \
&& apt install -y nano zip
# curl dtrx gnupg libgdiplus libc6-dev nodejs npm
# Fetch and install Node 12 LTS
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE 1
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt install -y nodejs
RUN node -v
RUN npm -v
# restore solution
RUN dotnet restore Virgol.sln
WORKDIR /src/Presentation/Virgol.School
# build project
RUN dotnet build Virgol.School.csproj --no-restore -c Release
# # build plugins
# WORKDIR /src/Plugins/Nop.Plugin.DiscountRules.CustomerRoles
# RUN dotnet build Nop.Plugin.DiscountRules.CustomerRoles.csproj -c Release
# publish project
# WORKDIR /src/Presentation/Virgol.School
RUN dotnet publish Virgol.School.csproj -c Release -o /app/published --self-contained false
# final stage/image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
# RUN apt update -yq \
# && apt install nano -yq
WORKDIR /app
COPY --from=build /app/published ./
EXPOSE 80 443
ENTRYPOINT ["./Virgol.School"]
# ENTRYPOINT ["tail", "-f", "/dev/null"]