Skip to content

Instantly share code, notes, and snippets.

@ajosanchez
Created August 20, 2020 18:38
Show Gist options
  • Save ajosanchez/419dd01ac609725173e3fae5cbcc6bf3 to your computer and use it in GitHub Desktop.
Save ajosanchez/419dd01ac609725173e3fae5cbcc6bf3 to your computer and use it in GitHub Desktop.
.NET 3.1 running on Ubuntu 18.04
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install wget -y
RUN wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb
RUN apt-get install -y apt-transport-https && \
apt-get update && \
apt-get install -y dotnet-sdk-3.1 && \
apt-get install -y aspnetcore-runtime-3.1
@ajosanchez
Copy link
Author

Build and run your container with the following commands:

cd <dir with Dockerfile>
docker build -t dotnet .
docker run -it --rm -v <your code dir here>:/code dotnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment