Skip to content

Instantly share code, notes, and snippets.

@horvaro
Last active September 2, 2020 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save horvaro/56a95d7c0f5b97ae69745ffaf5de3607 to your computer and use it in GitHub Desktop.
Save horvaro/56a95d7c0f5b97ae69745ffaf5de3607 to your computer and use it in GitHub Desktop.
.Net Core SDK 3.1 installer for Debian 9 containers
#!/usr/bin/env bash
# .Net Core SDK 3.1 installer for Debian 9 containers
# Invoke --> sh -c "$(curl -fsSL https://gist.githubusercontent.com/horvaro/56a95d7c0f5b97ae69745ffaf5de3607/raw/061da0bce88e9ac86468a3203a31085a686d5900/dotnetcore31_sdk_debian9.sh)"
set -o errexit
set -o nounset
apt-get update; \
apt-get install sudo gpg wget -y
# source: https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian#debian-9-
wget -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ && \
wget https://packages.microsoft.com/config/debian/9/prod.list && \
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list && \
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg && \
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment