Copied to clipboard

Flag this post as spam?

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


  • James Bacero 1 post 71 karma points
    May 22, 2023 @ 02:06
    James Bacero
    0

    The "GetUmbracoBuildVersion" task was not given a value for the required parameter "GitCommitIdShort".

    Hi there,

    I'm containerizing the Umbraco.Web.UI version 11.4. Already setup the Dockerfile in src/Umbraco.Web.UI folder and loaded every possible project I could find in the solution (except the tests).

    But when I build/publish the project, it gives me an error MSB4044: The "GetUmbracoBuildVersion" task was not given a value for the required parameter "GitCommitIdShort" [/src/Umbraco.Core/Umbraco.Core.csproj].

    Can someone help me? Been pulling my hair for 5 days now...

    Is Umbraco.Web.UI the correct project to containerize?

    Here's part of my Dockerfile script...

    enter image description here

    This is how it errors out...

    enter image description here

    Really appreciate it if someone can help me out.

    Cheers!

  • Bogdan Kosarevskyi 1 post 22 karma points
    Jul 06, 2023 @ 21:23
    Bogdan Kosarevskyi
    1

    Hey! I'm not sure, but it seems that Umbraco build requires a .git folder so that it can get the commit hash or smth like that.

    The minimal Dockerfile without any optimizations for me looks like this (Umbraco 10):

    FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy as publish
    RUN apt-get update
    RUN apt-get install curl
    RUN curl -s https://deb.nodesource.com/setup_18.x | bash && \
        apt-get install nodejs -y
    WORKDIR /app
    COPY . .
    RUN dotnet restore umbraco.sln
    RUN dotnet build -c Release --property WarningLevel=0
    RUN dotnet publish -c Release -o /artifacts src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
    
    FROM mcr.microsoft.com/dotnet/aspnet:6.0-jammy AS base
    WORKDIR /app
    EXPOSE 80 443
    COPY --from=publish /artifacts .
    ENTRYPOINT ["dotnet", "Umbraco.Web.UI.dll"]
    

    Of course you have to clone repo at first. If you want to have a perfect Dockerfile - you should use multistage. 1st stage - setup git, node and other deps you need, 2nd - clone repo and build, 3rd - publish, 4th and the last - copy published dlls to your result image.

  • Proxicode 127 posts 323 karma points
    Sep 23, 2023 @ 16:21
    Proxicode
    0

    This was totally it!! Trying to run a local copy of the downloaded .zip when I saw this error. Doing a proper clone resolved it for me. Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft