Skip to content

Instantly share code, notes, and snippets.

@gmirsky
Created June 30, 2020 18:13
Show Gist options
  • Select an option

  • Save gmirsky/44943c6a1fac4646bd1e924cff0d448c to your computer and use it in GitHub Desktop.

Select an option

Save gmirsky/44943c6a1fac4646bd1e924cff0d448c to your computer and use it in GitHub Desktop.
Dockerfile for .NET Framework image with WindowsServerCore
# escape=`
# use .NET Framework image with WindowsServerCore
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8
WORKDIR /app
# copy published application files inside the image
COPY _artifacts/appfiles /.
# configure web servers to bind to port 80 when present
ENV ASPNETCORE_URLS=http://+:80 `
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINERS=true `
# ignore first time expierence
DOTNET_SKIP_FIRST_TIME_EXPERIENCE="true"
# start the exe on container startup
ENTRYPOINT ["ApplicationName.exe"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment