-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Description
Is there really no way to set ownership and permissions of a VOLUME?
~ $ docker build -t test -
FROM ubuntu
RUN mkdir /data ; chmod 777 /data
VOLUME ["/data"]
RUN chmod 755 /data
Uploading context 2048 bytes
Step 1 : FROM ubuntu
---> 8dbd9e392a96
Step 2 : RUN mkdir /data ; chmod 777 /data
---> Using cache
---> 5e2d567c32ef
Step 3 : VOLUME ["/data"]
---> Using cache
---> d2832c4afd2c
Step 4 : RUN chmod 755 /data
---> Running in 34b05587ce60
---> 7c4d94ba6eed
Successfully built 7c4d94ba6eed
~ $ docker run -t -i test ls -la /data
total 8
drwx------ 2 root root 4096 Nov 30 09:25 .
drwxr-xr-x 37 root root 4096 Nov 30 09:25 ..
I'm making a container which will run something that does not want to run as root, so 700 is particularly frustrating.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels