-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
67 lines (59 loc) · 1.71 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
FROM halplatform/hal-build-environments:debian10-buildpack
# Install .NET CLI dependencies
RUN \
apt-get update \
&& \
apt-get install -y --no-install-recommends \
libicu63 \
libssl1.1 \
libc6 \
libgcc1 \
libgssapi-krb5-2 \
liblttng-ust0 \
libstdc++6 \
zlib1g \
\
gettext \
apt-transport-https \
&& \
rm -rf /var/lib/apt/lists/*
ENV DOTNET_SDK_VERSION "3.1"
ENV DOTNET_PACKAGE_VERSION "3.1.100"
ENV POWERSHELL_VERSION "7.0.0-rc.1"
# Install Dotnet
RUN curl -sL "https://packages.microsoft.com/keys/microsoft.asc" | apt-key add - \
&& \
curl -sLo "/etc/apt/sources.list.d/microsoft.list" \
"https://packages.microsoft.com/config/debian/10/prod.list" \
&& \
apt-get update \
&& \
apt-get install -y \
"dotnet-sdk-${DOTNET_SDK_VERSION}=${DOTNET_PACKAGE_VERSION}-1" \
&& \
rm -rf /var/lib/apt/lists/*
# Install Powershell
RUN curl -sLo "/tmp/powershell.tgz" \
"https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-x64.tar.gz" \
&& \
mkdir -p "/opt/microsoft/powershell/7" \
&& \
tar zxf "/tmp/powershell.tgz" -C "/opt/microsoft/powershell/7" \
&& \
chmod +x "/opt/microsoft/powershell/7/pwsh" \
&& \
ln -s "/opt/microsoft/powershell/7/pwsh" /usr/bin/pwsh
ENV NUGET_XMLDOC_MODE skip
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
# Trigger the population of the local package cache
RUN mkdir warmup \
&& \
cd warmup \
&& \
dotnet new \
&& \
cd .. \
&& \
rm -rf warmup \
&& \
rm -rf /tmp/NuGetScratch