Containerizing a WebMap .Net Application with Docker
Prerequisites
Steps
# Use the official .NET SDK image as a build environment
# You can find the latest version of the SDK here: https://hub.docker.com/r/microsoft/dotnet-sdk
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
# Set the working directory inside the container
WORKDIR /app
# Set the ASPNETCORE_URLS variable
# You can set whatever port you want
# ENV ASPNETCORE_URLS=http://0.0.0.0:<PORT>
ENV ASPNETCORE_URLS=http://0.0.0.0:80
#Expose the same port that was assigned in the ASPNETCORE_URLS
EXPOSE 80
# Copy the binaries app folder in the root
COPY deploy .
# Set the entrypoint
ENTRYPOINT ["dotnet", "app/yourApp.dll"]Create a container with a .yaml file
Prerequisites
Steps
Last updated
Was this helpful?
