Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Marshall Penn 79 posts 260 karma points
    Jun 06, 2023 @ 10:01
    Marshall Penn
    1

    Instructions on how to build a Docker image for Umbraco 10.4

    We have been creating linux docker images with Umbraco 10.4 with great success. This is for a headless system, so we have only been concerned with the back office and are not looking at the Umbraco front end capabilities etc.

    Here is the Docker file for our project:

    FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy AS build-env
    WORKDIR /source
    COPY src/OurWebApplication.Web/OurWebApplication.Web.csproj ./
    RUN dotnet restore 
    COPY src/OurWebApplication.Web .
    RUN dotnet publish -c Release -o /app/publish
    FROM mcr.microsoft.com/dotnet/aspnet:6.0-jammy
    WORKDIR /app
    EXPOSE 443
    EXPOSE 80
    ENV ASPNETCORE_ENVIRONMENT=Production
    COPY --from=build-env /app/publish .
    ENTRYPOINT ["dotnet", "OurWebApplication.Web.dll"]
    

    Bear in mind that we only have the one project in the solution. If you have more projects (as is usual) then you will have to muck around with more statements. When we build on Devops the build is really fast and it seems to run much faster than on windows with the same resources.

Please Sign in or register to post replies

Write your reply to:

Draft