docker-mbsync icon indicating copy to clipboard operation
docker-mbsync copied to clipboard

PUID PGID not working?

Open marviins87 opened this issue 3 years ago • 1 comments

I'm using the following docker-compose but all emails are still written as root user. Is PUID/PGID not working?

version: "3.4"
services:
  mbsync:
    image: jakewharton/mbsync:latest
    container_name: mbsync
    volumes:
      - /home/docker/mbsync:/config
      - /home/docker/mbsync/mail:/mail
    environment:
      - CRON="0 * * * *"
      #Optional:
      - "PUID=1000"
      - "PGID=1000"
    restart: unless-stopped
    command: /app/sync.sh
Initializing container
User uid: 1000
User gid: 1000
[cont-init.d] 10-adduser.sh: exited 0.
[cont-init.d] 20-cron.sh: executing... 
NOTE: Define HEALTHCHECK_ID with https://healthchecks.io to monitor sync job
Initializing cron
"0 * * * *"
[cont-init.d] 20-cron.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
INFO: Starting sync.sh PID 212 Thu Jun 17 14:09:06 UTC 2021
docker@docker01:~/mbsync/mail$ ls -l Inbox/cur
total 64692
-rw------- 1 root root   92443 Jun 17 16:02 '1623938567.225_10.7462ef4dcae5,U=10:2,S'
-rw------- 1 root root   37611 Jun 17 16:02 '1623938567.225_11.7462ef4dcae5,U=11:2,S'
-rw------- 1 root root   67230 Jun 17 16:02 '1623938567.225_12.7462ef4dcae5,U=12:2,S'
-rw------- 1 root root  237401 Jun 17 16:02 '1623938567.225_13.7462ef4dcae5,U=13:2,S'

marviins87 avatar Jun 17 '21 14:06 marviins87

Hmm I can't reproduce this. I tried on both Linux and Mac OS.

JakeWharton avatar Nov 23 '21 14:11 JakeWharton