linuxserver / docker-code-server

GNU General Public License v3.0
1.61k stars 326 forks source link

Starting code-server container with userns-remap fails #42

Closed thbley closed 2 years ago

thbley commented 3 years ago

Since I'm using userns-remap in docker daemon, I have to use userns=host to be able to write files inside a docker container with my host uid. Starting code-server using userns=host fails.

Expected Behavior

docker container starts

Current Behavior

docker run --rm -it --userns=host linuxserver/code-server:latest bash gives: s6-overlay-preinit: fatal: unable to chown /var/run/s6: Operation not permitted

Steps to Reproduce

/etc/docker/daemon.json {"userns-remap": "dockremap", "icc": false,"experimental": true} /etc/subuid dockremap:231072:65536 /etc/subgid dockremap:231072:65536

docker run --rm -it --userns=host linuxserver/code-server:latest bash gives: s6-overlay-preinit: fatal: unable to chown /var/run/s6: Operation not permitted

docker -v Docker version 19.03.13, build 4484c46d9d

Environment

OS:Linux Mint 20 CPU architecture: x86_64 **How docker service was installed: ppa: https://download.docker.com/linux/ubuntu dpkg --list | grep docker ii docker-ce 5:19.03.13~3-0~ubuntu-focal amd64 Docker: the open-source application container engine ii docker-ce-cli 5:19.03.13~3-0~ubuntu-focal amd64 Docker CLI: the open-source application container engine

docker -v Docker version 19.03.13, build 4484c46d9d

Command used to create docker container (run/create/compose/screenshot)

docker run --rm -it --userns=host linuxserver/code-server:latest bash

Docker logs

s6-overlay-preinit: fatal: unable to chown /var/run/s6: Operation not permitted

Thanks for your help!

github-actions[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

Roxedus commented 3 years ago

Know limitation with the S6-overlay. https://github.com/linuxserver/docker-unifi-controller/issues/62#issuecomment-726119049

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.