Closed DavidHenryThoreau closed 5 months ago
You can pass the -u
flag to docker run
; if the volume is writable for that user, everything should work (you may need to use an unprivileged port too)
For all docker compose pull && docker compose up -d
app I'm using these env vars :
environment:
- PUID=1000
- PGID=1000
I'm looking at -u
if that fix this error.
My first message was to create a workout-tracker user directly in the Dockerfile
I will try this option too, if you're ok i'll do a PR.
Yes that's how linuxserver build their images; I have nothing against it, but seems like an extra layer which is not per se necessary...
I tested with:
docker run --rm -i -p 8080:8080 -u 1000:1000 -v $(pwd):/data workout-tracker
This seems to work, as long as $(pwd)
is owned by the uid (1000
).
Otherwise, you get a weird error:
failed to initialize database, got error unable to open database file: out of memory (14)
Inside the docker image the app seems to run as root user:
Maybe it would be great to create a user with less privileges ?