update docker to netcore3
This commit is contained in:
1 parent
68f43cef8d
commit
9fb17ce870
1 file changed
+35
-8
+35
-8
@@ -108,21 +108,48 @@ set mouse= \n\
|
||||
imap jj <Esc> \n\
|
||||
' >> /etc/vim/vimrc
|
||||
|
||||
#taken from https://hub.docker.com/r/microsoft/dotnet/~/dockerfile/
|
||||
# region .net core
|
||||
|
||||
# region NETCORE3
|
||||
# taken from https://hub.docker.com/_/microsoft-dotnet-core-sdk
|
||||
# taken from https://github.com/dotnet/dotnet-docker/blob/master/3.0/sdk/bionic/amd64/Dockerfile
|
||||
|
||||
# Install .NET Core SDK
|
||||
ENV DOTNET_SDK_VERSION 2.1.500
|
||||
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz
|
||||
ENV DOTNET_SDK_DOWNLOAD_SHA 85055728e2433dfde41d15c85475f2dc6cfdd30242b4b23065b63cb12cc846acb93c09c000b02b722890ceac8ac382b40871c78660716ca2339c71052fe52f4e
|
||||
ENV NUGET_XMLDOC_MODE skip
|
||||
RUN curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \
|
||||
&& echo "$DOTNET_SDK_DOWNLOAD_SHA dotnet.tar.gz" | sha512sum -c - \
|
||||
ENV DOTNET_SDK_VERSION 3.0.100
|
||||
|
||||
RUN curl -SL --output dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz \
|
||||
&& dotnet_sha512='766da31f9a0bcfbf0f12c91ea68354eb509ac2111879d55b656f19299c6ea1c005d31460dac7c2a4ef82b3edfea30232c82ba301fb52c0ff268d3e3a1b73d8f7' \
|
||||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
|
||||
&& mkdir -p /usr/share/dotnet \
|
||||
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
|
||||
&& rm dotnet.tar.gz \
|
||||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
|
||||
|
||||
# Enable detection of running in a container
|
||||
ENV DOTNET_RUNNING_IN_CONTAINER=true \
|
||||
# Enable correct mode for dotnet watch (only mode supported in a container)
|
||||
DOTNET_USE_POLLING_FILE_WATCHER=true \
|
||||
# Skip extraction of XML docs - generally not useful within an image/container - helps performance
|
||||
NUGET_XMLDOC_MODE=skip
|
||||
|
||||
# Trigger first run experience by running arbitrary cmd
|
||||
RUN dotnet help
|
||||
|
||||
# Install PowerShell global tool
|
||||
ENV POWERSHELL_VERSION=7.0.0-preview.4 \
|
||||
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetCoreSDK-Ubuntu-18.04
|
||||
|
||||
RUN curl -SL --output PowerShell.Linux.x64.$POWERSHELL_VERSION.nupkg https://pwshtool.blob.core.windows.net/tool/$POWERSHELL_VERSION/PowerShell.Linux.x64.$POWERSHELL_VERSION.nupkg \
|
||||
&& powershell_sha512='0fb0167e13560371bffec38a4a87bf39377fa1a5cc39b3a078ddec8803212bede73e5821861036ba5c345bd55c74703134c9b55c49385f87dae9e2de9239f5d9' \
|
||||
&& echo "$powershell_sha512 PowerShell.Linux.x64.$POWERSHELL_VERSION.nupkg" | sha512sum -c - \
|
||||
&& mkdir -p /usr/share/powershell \
|
||||
&& dotnet tool install --add-source / --tool-path /usr/share/powershell --version $POWERSHELL_VERSION PowerShell.Linux.x64 \
|
||||
&& rm PowerShell.Linux.x64.$POWERSHELL_VERSION.nupkg \
|
||||
&& ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \
|
||||
# To reduce image size, remove the copy nupkg that nuget keeps.
|
||||
&& find /usr/share/powershell -print | grep -i '.*[.]nupkg$' | xargs rm
|
||||
|
||||
# endregion NETCORE3
|
||||
|
||||
run DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 dotnet tool install --tool-path /usr/local/bin paket
|
||||
run chmod +X /usr/local/bin/paket
|
||||
|
||||
|
||||
Reference in new issue
Block a user