Official docker Piwigo Image tips (feedbacks) and issues #2164

Open
opened 2026-10-05 01:08:25 +02:00 by adam · 1 comment
Owner

Hello,

I plan to migrate my piwigo installation to a docker configuration with the official image.
So first, I test it on pi test platform:
HW: Raspberry Pi 4 Model B Rev 1.5
OS: Debian GNU/Linux 13 (trixie) aarch64
Kernel: Linux 6.12.47+rpt-rpi-v8
docker --version: Docker version 29.1.2, build 890dcca

I follow the documentation available here: https://piwigo.org/guides/install/docker
(note: screenshots are from 15.7.0 piwigo version not 16.1;-) )

1/ in the compose.yaml file, the following standza

   networks:
      piwigo-network:
        external: false

is well placed (at the beginning of the file) IF docker is only used for piwigo (and its DB).
Otherwise the standza must be placed at the end of the file (after piwigo-main: and piwigo-db: , not the beginning, otherwise docker displays the following message:

 $ docker compose up -d
validating /home/user/docker/docker-compose.yaml: networks.piwigo-db additional properties 'environment', 'image', 'networks', 'restart', 'volumes' not allowed

This is in the case of only one docker-compose.yaml file for many containers (not only for piwigo)

2/ "Step 2 - Configure the reverse proxy"
Not yet tested. In the future it will be configured with a traefik container

3/ Both containers are up and running

docker logs docker-piwigo-main-1  shows
...
cont-init: info: running /etc/cont-init.d/10-piwigo-setup
Installing piwigo version 16.1.0
No user script found; you can optionally add one in ./piwigo-data/scripts/user.sh
...

However there is nothing in the documentation about scripts? What kind of scripts can be placed there?

The installation is successful
Image

4/ owner/group issues
piwigo directory and files belongs to dhcpcd for the owner and _ssh for the group
Image
from the container, /var/www/html/piwigo belongs to nginx:nginx (or UID 100 and GID 101)
Image

mysql directory and files belongs to 999 for the owner and systemd-journal for the group
because there is no userid on the pi with 999 as uid, the gid 999 maps to systemd-journal group.
Image
from the container, /var/lib/mysql belongs to mysql:mysql (or UID 999 and GID 999)
Image

scripts directory belong to root:root , why not.

It is not possible to basicaly copy image files and video in ./piwigo-data/piwigo

$ cp  ~/2025-12-27_15-19-20_IMG_7913.JPG .
cp: impossible de créer le fichier standard './2025-12-27_15-19-20_IMG_7913.JPG': Permission non accordée

How to map uid:gid of the user to avoid dhcpcd:_ssh between the OS and the container?

On raspberry pi os:

$ grep 100 /etc/passwd
dhcpcd:x:100:65534:DHCP Client Daemon:/usr/lib/dhcpcd:/bin/false

 $ grep 101 /etc/group
_ssh:x:101:

5/ For testing, copy of an image file with sudo in ./galleries and changing owner/group to dhcpcd: _ssh
Nothing happens during piwigo synchronization [ admin -> tools -> synchro (and yes directories and files) not directories only ]
Image

It works when a sub-directory is added with an image in it
Image

Then all thumbtails are correctly generated and checksum calculation is ok, too.

Thanks for your help
Regards
Phil

Hello, I plan to migrate my piwigo installation to a docker configuration with the official image. So first, I test it on pi test platform: HW: Raspberry Pi 4 Model B Rev 1.5 OS: Debian GNU/Linux 13 (trixie) aarch64 Kernel: Linux 6.12.47+rpt-rpi-v8 docker --version: Docker version 29.1.2, build 890dcca I follow the documentation available here: https://piwigo.org/guides/install/docker (note: screenshots are from 15.7.0 piwigo version not 16.1;-) ) **1/** in the compose.yaml file, the following standza ``` networks: piwigo-network: external: false ``` is well placed (at the beginning of the file) IF docker is only used for piwigo (and its DB). Otherwise the standza must be placed at the end of the file (after piwigo-main: and piwigo-db: , not the beginning, otherwise docker displays the following message: ``` $ docker compose up -d validating /home/user/docker/docker-compose.yaml: networks.piwigo-db additional properties 'environment', 'image', 'networks', 'restart', 'volumes' not allowed ``` This is in the case of only one docker-compose.yaml file for many containers (not only for piwigo) **2/** "Step 2 - Configure the reverse proxy" Not yet tested. In the future it will be configured with a traefik container **3/** Both containers are up and running ``` docker logs docker-piwigo-main-1 shows ... cont-init: info: running /etc/cont-init.d/10-piwigo-setup Installing piwigo version 16.1.0 No user script found; you can optionally add one in ./piwigo-data/scripts/user.sh ... ``` However there is nothing in the documentation about scripts? What kind of scripts can be placed there? The installation is successful <img width="785" height="271" alt="Image" src="https://github.com/user-attachments/assets/8f0d79f0-1cd6-4d84-9b40-b3d161e81827" /> **4/** owner/group issues piwigo directory and files belongs to dhcpcd for the owner and _ssh for the group <img width="625" height="26" alt="Image" src="https://github.com/user-attachments/assets/1cbaadeb-3638-4abd-a6a2-941eb77c59c6" /> from the container, /var/www/html/piwigo belongs to nginx:nginx (or UID 100 and GID 101) <img width="667" height="172" alt="Image" src="https://github.com/user-attachments/assets/20fb0758-b677-42f2-8d6a-33200a9d7e8d" /> mysql directory and files belongs to 999 for the owner and systemd-journal for the group because there is no userid on the pi with 999 as uid, the gid 999 maps to systemd-journal group. <img width="625" height="26" alt="Image" src="https://github.com/user-attachments/assets/32fff312-218c-47c8-a3e5-a05ccd61b338" /> from the container, /var/lib/mysql belongs to mysql:mysql (or UID 999 and GID 999) <img width="667" height="172" alt="Image" src="https://github.com/user-attachments/assets/4440408f-4e60-4613-b12c-06ee0955962b" /> scripts directory belong to root:root , why not. It is not possible to basicaly copy image files and video in ./piwigo-data/piwigo ``` $ cp ~/2025-12-27_15-19-20_IMG_7913.JPG . cp: impossible de créer le fichier standard './2025-12-27_15-19-20_IMG_7913.JPG': Permission non accordée ``` How to map uid:gid of the user to avoid dhcpcd:_ssh between the OS and the container? On raspberry pi os: ``` $ grep 100 /etc/passwd dhcpcd:x:100:65534:DHCP Client Daemon:/usr/lib/dhcpcd:/bin/false $ grep 101 /etc/group _ssh:x:101: ``` **5/** For testing, copy of an image file with sudo in ./galleries and changing owner/group to dhcpcd: _ssh Nothing happens during piwigo synchronization [ admin -> tools -> synchro (and yes directories and files) not directories only ] <img width="801" height="116" alt="Image" src="https://github.com/user-attachments/assets/193ecd9e-a522-4c51-ac72-a25422d1fdaa" /> It works when a sub-directory is added with an image in it <img width="1046" height="518" alt="Image" src="https://github.com/user-attachments/assets/51f3ef11-0977-4aef-90aa-999ed1744d9c" /> Then all thumbtails are correctly generated and checksum calculation is ok, too. Thanks for your help Regards Phil <!-- github-sync-id:3765983404 -->
Author
Owner

Hi,
Sorry I didn't know that a dedicated repository exists.
So I open one issue on https://github.com/Piwigo/piwigo-docker/issues/7
Thanks
Phil

Hi, Sorry I didn't know that a dedicated repository exists. So I open one issue on https://github.com/Piwigo/piwigo-docker/issues/7 Thanks Phil <!-- github-comment-id:3700262481 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#2164