Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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...
This is how it errors out...
Really appreciate it if someone can help me out.
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
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
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.
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!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted