-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile1.original
More file actions
38 lines (31 loc) · 1.32 KB
/
Dockerfile1.original
File metadata and controls
38 lines (31 loc) · 1.32 KB
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
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat
FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-sac2016 AS base
WORKDIR /app
EXPOSE 8000
##EXPOSE 443
#install git
WORKDIR /
COPY ["mingit.zip", "/" ]
RUN mkdir mingit
RUN Expand-Archive MinGit.zip -DestinationPath c:\MinGit;
#COPY ["mingit", "/mingit/" ] \
RUN $env:PATH = $env:PATH + ';C:\mingit\cmd\;C:\mingit\cmd'; \
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH
FROM microsoft/dotnet:2.2-sdk-nanoserver-sac2016 AS build
WORKDIR /src
COPY [".", "SqlSCM/"]
RUN dotnet restore "SqlSCM/SqlSCM.csproj"
COPY . .
WORKDIR "/src/SqlSCM"
RUN dotnet build "SqlSCM.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "SqlSCM.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
#COPY ["aspncer.pfx", "."]
#RUN Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
COPY ["SqlSCM.xml", "."]
COPY --from=publish /app .
RUN del C:\app\appsettings.json
ENTRYPOINT ["dotnet", "SqlSCM.dll"]