Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions guides/hosting/installation-updates/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ This is just an example compose file to demonstrate what the services could look

```yaml
x-environment: &shopware
image: local
build:
context: .
environment:
Expand All @@ -186,11 +185,22 @@ services:
database:
image: mariadb:11.4

init-perm:
<<: *shopware
user: "root"
entrypoint: >
chown 82:82
/var/www/html/files
/var/www/html/public/theme
/var/www/html/public/media
/var/www/html/public/thumbnail
/var/www/html/public/sitemap
Comment on lines +191 to +197
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entrypoint command using the YAML multiline string operator > will concatenate all lines into a single line with spaces. This means the command will become chown 82:82 /var/www/html/files /var/www/html/public/theme /var/www/html/public/media /var/www/html/public/thumbnail /var/www/html/public/sitemap which is incorrect syntax for the chown command. The -R flag is missing for recursive directory permissions, and the paths should be passed correctly. Consider using entrypoint: ["chown", "-R", "82:82", "/var/www/html/files", "/var/www/html/public/theme", "/var/www/html/public/media", "/var/www/html/public/thumbnail", "/var/www/html/public/sitemap"] or use a shell command with proper syntax.

Suggested change
entrypoint: >
chown 82:82
/var/www/html/files
/var/www/html/public/theme
/var/www/html/public/media
/var/www/html/public/thumbnail
/var/www/html/public/sitemap
entrypoint: [ "chown", "-R", "82:82", "/var/www/html/files", "/var/www/html/public/theme", "/var/www/html/public/media", "/var/www/html/public/thumbnail", "/var/www/html/public/sitemap" ]

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-R was explicitly not added, because I want the initial startup using the example to work, but don't want to touch gigabytes of files each time I restart the container.

The other comment I do not get. What is wrong with the syntax? It works. Does it really need to be the very verbose array syntax? Why? Any links to official docs maybe?


init:
<<: *shopware
entrypoint: /setup
depends_on:
db:
database:
condition: service_started
init-perm:
condition: service_completed_successfully
Expand All @@ -217,6 +227,13 @@ services:
init:
condition: service_completed_successfully
entrypoint: [ "php", "bin/console", "scheduled-task:run" ]

volumes:
files:
theme:
media:
thumbnail:
sitemap:
```

<PageRef page="https://github.com/shopwareLabs/example-docker-repository/" title="Example Repository with fully working setup" target="_blank" />
Expand Down
Loading