1

Trying to use overlayfs within a Docker container.

root@din:~# mount -t overlay overlay -o lowerdir=/etc,upperdir=/oetc,workdir=/root/work /mnt
mount: /mnt: permission denied.
root@din:~# ls -ld /mnt
drwxrwxrwx 1 root root 4096 Jun 12 16:54 /mnt
root@din:~# ls -ld /oetc
drwxr-xr-x 2 root root 4096 Jul 26 19:53 /oetc
root@din:~# ls -ld /root/work
drwxr-xr-x 2 root root 4096 Jul 26 19:33 /root/work

I don't know how to identify what the permission problem is, or if it is symptomatic of something else.

1 Answer 1

2

You need to add privileges to the container.

docker run --rm -it  --cap-add=SYS_ADMIN ubuntu:latest

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .