-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.amd64
29 lines (24 loc) · 1.1 KB
/
Dockerfile.amd64
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
# Build Artifacts
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build-env
WORKDIR /app
COPY . .
RUN dotnet restore PowerShellExec.csproj
RUN dotnet publish PowerShellExec.csproj -c Release -o out --self-contained true -r linux-x64
#RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-dump
# Create Final Image
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim
# Copy PowerShellExec artifacts
COPY --from=build-env /app/out ./
# Install PowerShell SDK
RUN apt-get update -y
RUN apt-get -y install wget
RUN apt-get -y install gss-ntlmssp
RUN apt-get -y install netbase
RUN wget "http://http.us.debian.org/debian/pool/main/g/glibc/multiarch-support_2.19-18+deb8u10_amd64.deb"
RUN dpkg -i multiarch-support_2.19-18+deb8u10_amd64.deb
RUN wget "http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb"
RUN dpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb
# Copy dotnetcore-tools
# COPY --from=build-env /dotnetcore-tools /opt/dotnetcore-tools
# ENV PATH="/opt/dotnetcore-tools:${PATH}"
CMD ["dotnet", "PowerShellExec.dll"]