Running Umbraco (v13-15) in Docker

Following the instructions on this page: Running Umbraco in Docker using Docker Compose | Umbraco CMS

The installation cannot complete:

I’ve followed the steps exactly as they are given in the link above. The docker container logs doesn’t provide me with any information either, part from one thing:

2025-03-24 19:15:42 [18:15:42 WRN] Storing keys in a directory ‘/home/app/.aspnet/DataProtection-Keys’ that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to Data Protection configuration in ASP.NET Core
2025-03-24 19:15:43 [18:15:43 INF] Starting recurring background jobs hosted services
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for OpenIddictCleanupJob
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for HealthCheckNotifierJob
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for LogScrubberJob
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for ContentVersionCleanupJob
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for ScheduledPublishingJob
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for TempFileCleanupJob
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for TemporaryFileCleanupJob
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for InstructionProcessJob
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for TouchServerJob
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for WebhookFiring
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for WebhookLoggingCleanup
2025-03-24 19:15:43 [18:15:43 INF] Starting background hosted service for ReportSiteJob
2025-03-24 19:15:43 [18:15:43 INF] Completed starting recurring background jobs hosted services
2025-03-24 19:15:43 [18:15:43 INF] Now listening on: http://[::]:8080
2025-03-24 19:15:43 [18:15:43 INF] Application started. Press Ctrl+C to shut down.
2025-03-24 19:15:43 [18:15:43 INF] Hosting environment: Development
2025-03-24 19:15:43 [18:15:43 INF] Content root path: /app
2025-03-24 19:16:20 [18:16:20 INF] Checking if FilePermissionsStep requires execution
2025-03-24 19:16:20 [18:16:20 INF] Running FilePermissionsStep
2025-03-24 19:16:20 [18:16:20 ERR] Failed FilePermissionsStep, with the message: Permission check failed:
2025-03-24 19:16:20 Folder creation: /wwwroot/css, /wwwroot/media
2025-03-24 19:16:20 File writing for packages:
2025-03-24 19:16:20 File writing:
2025-03-24 19:16:20 Media folder creation: /app/wwwroot/media

It does say something about a FilePermissionStep that’s failing. Is this related perhaps?

I don’t have an answer for you, but this discussion might help: Running Umbraco in Containers – Share Your Experience · umbraco/Umbraco-CMS · Discussion #18468 · GitHub

I had a problem in my DockerFile as well, I think. I now have these lines in there to make sure I set the correct permissions:

RUN chown $APP_UID umbraco --recursive
RUN chown $APP_UID wwwroot/media --recursive

I’ll post the last bit of my DockerFile as I made a few changes from the default there:

# We need to make sure that the user running the app has write access to the umbraco folder, in order to write logs and other files.
# Since these are volumes they are created as root by the docker daemon.
USER root
RUN mkdir umbraco
RUN mkdir umbraco/Data
RUN mkdir umbraco/Data/TEMP
RUN mkdir umbraco/Logs
RUN mkdir wwwroot/media
RUN chown $APP_UID umbraco --recursive
RUN chown $APP_UID wwwroot/media --recursive
USER $APP_UID
ENTRYPOINT ["dotnet", "MySite.dll"]

Now that I think about it; the Umbraco 15 dotnet templates package (Umbraco.Templates) has a Dockerfile template in there as well. I think that also has some code like @sebastiaan mentioned for this exact issue.

Correct, the default DockerFile is lacking a few things though, hence the updates above. This is something we’re on our way to fixing as well.

1 Like

I applied the changes you’ve made, but im still getting the same outcome sadly.
I removed all the images I had and built everything up again but I cannot get umbraco to install.

And the logs are still the same as before the changes:

2025-03-25 18:30:21 [17:30:21 INF] Checking if FilePermissionsStep requires execution
2025-03-25 18:30:21 [17:30:21 INF] Running FilePermissionsStep
2025-03-25 18:30:21 [17:30:21 ERR] Failed FilePermissionsStep, with the message: Permission check failed:
2025-03-25 18:30:21 Folder creation: /wwwroot/css
2025-03-25 18:30:21 File writing for packages:
2025-03-25 18:30:21 File writing:
2025-03-25 18:30:21 Media folder creation:

have you made changes to your docker-compose file as well?

I don’t have a docker-compose.

Seems like you need to change

RUN chown $APP_UID wwwroot/media --recursive

to

RUN chown $APP_UID wwwroot --recursive

That didn’t help either

Then… I wish you luck! :sweat_smile: :see_no_evil_monkey:

Disclaimer: I have no idea what I’m doing, stuff just started working for me and I don’t have a lot of experience..

Im doing all of this from my WSL environment, it really shouldn’t matter.
But im gonna try it from my windows host straight and see if that helps it

Ok, running straight from windows solved it. So it has to do with running from WSL then…

1 Like

Interesting! I’ve not used WSL and did this straight on Ubuntu!

Have you tried building your docker image, is that able to build successfully?

Also are you using Sqlite or a separate SQL server for the database?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.