resources
stanza for Docker driver task somehow causes permission issues within the container
#24774
Labels
resources
stanza for Docker driver task somehow causes permission issues within the container
#24774
Nomad version
Operating system and Environment details
Linux pi-cluster-5-01 6.6.51+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64
Docker version 27.4.0, build bde2b89
Issue
I'm trying to deploy an image
lscr.io/linuxserver/nextcloud:latest
. Here's my jobspec:The env values are all the default values for that container. The PUID and GUID env vars are the standard values for that image. The problem is that the container fails to initialise because it gets permission denied errors trying to
chown
dirs within the container:... and indeed, when I
sh
into the container via Docker CLI and try tochown
one of those dirs, I confusingly get permission denied even though I'mroot
with id0:0
.I then tried deploying the image directly through the Docker CLI with the same config, and to my further confusion, everything worked fine. I
sh
into that container too, I'm alsoroot
there, but I canchown
all the dirs just fine, and the init script also works. The output ofid
is 100% identical between the two containers.So, I try to prepare a minimum reproducible example, and discover that it seems to be related to the
resources
stanza in the task, somehow. When I remove it, the nomad-orchestrated container has no permission issues. When I add it back, they're back. This seems to be reproducible on my end 100% of the time. I have no idea what could be going on here.Reproduction steps
resources
stanza and once withoutsudo docker ps
to find the container IDs of the two containerssudo docker exec -it < container ID>
to enter shell in both containerschown 1000:1000
onapp/
(or any other dir)Expected Result
app/
dir in both is owned byroot
and the user isroot
, the chown should work on both containersActual Result
chown
fails withPermission denied
on the resource-constrained container, but works as expected on the one that's not.The text was updated successfully, but these errors were encountered: