linuxserver / docker-mods

Documentation and Examples of base container modifications
GNU General Public License v3.0
989 stars 262 forks source link

[BUG] Docker in Docker does not work in linuxserver/code-server container #865

Closed acondura closed 4 months ago

acondura commented 5 months ago

Is there an existing issue for this?

Name of mod

linuxserver/mods:universal-docker-in-docker

Name of base container

linuxserver/code-server

Current Behavior

I get /var/run/docker.sock: connect: permission denied when using 'docker ps', for example.

Expected Behavior

I should get a list of containers.

Steps To Reproduce

  1. Use the following docker-compose.yml file:

version: '3' services: code-server: image: lscr.io/linuxserver/code-server container_name: code-server environment:

  1. Build and up the container
  2. Go inside the container and run docker ps

Environment

- OS: Ubuntu 22.04
- How docker service was installed: Not relevant. I'm trying to use Docker in Docker.

CPU architecture

x86-64

Docker creation

Docker in Docker mod inside linuxserver/code-server.

Container logs

Recreating code-server ... done
[mod-init] Running Docker Modification Logic
[mod-init] Adding linuxserver/mods:universal-docker-in-docker to container
[mod-init] Downloading linuxserver/mods:universal-docker-in-docker from lscr.io
[mod-init] Installing linuxserver/mods:universal-docker-in-docker
[mod-init] linuxserver/mods:universal-docker-in-docker applied to container
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

setting up sudo access
adding abc to sudoers
setting sudo password using SUDO_PASSWORD env var
New password: Retype new password: passwd: password updated successfully
**** installing docker and docker compose ****
**** Adding docker-in-docker dependency packages to install list ****
Copying over docker and docker-compose binaries
[mod-init] **** Installing all mod packages ****
Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy/universe Sources [22.0 MB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/multiverse Sources [361 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/main Sources [1,668 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/restricted Sources [28.2 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1,792 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main Sources [602 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Sources [21.8 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Sources [71.0 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/universe Sources [405 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1,848 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [50.4 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1,998 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1,353 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy-security/main Sources [323 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy-security/universe Sources [234 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy-security/multiverse Sources [12.1 kB]
Get:23 http://archive.ubuntu.com/ubuntu jammy-security/restricted Sources [67.0 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1,079 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1,569 kB]
Get:26 http://archive.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.6 kB]
Get:27 http://archive.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1,961 kB]
Fetched 55.9 MB in 4s (13.2 MB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20230311ubuntu0.22.04.1).
ca-certificates set to manually installed.
curl is already the newest version (7.81.0-1ubuntu1.15).
e2fsprogs is already the newest version (1.46.5-2ubuntu1.1).
openssh-client is already the newest version (1:8.9p1-3ubuntu0.6).
openssh-client set to manually installed.
The following additional packages will be installed:
  libdevmapper1.02.1 libicu70 libinih1 libip4tc2 libip6tc2 liblzo2-2 libmnl0
  libmpdec3 libnetfilter-conntrack3 libnfnetlink0 libnftnl11 libpython3-stdlib
  libpython3.10-minimal libpython3.10-stdlib libxtables12 media-types python3
  python3-minimal python3.10 python3.10-minimal
Suggested packages:
  duperemove firewalld kmod nftables python3-doc python3-tk python3-venv
  python3.10-venv python3.10-doc binutils binfmt-support xfsdump acl attr
  quota
Recommended packages:
  dmsetup
The following NEW packages will be installed:
  btrfs-progs iptables libdevmapper1.02.1 libicu70 libinih1 libip4tc2
  libip6tc2 liblzo2-2 libmnl0 libmpdec3 libnetfilter-conntrack3 libnfnetlink0
  libnftnl11 libpython3-stdlib libpython3.10-minimal libpython3.10-stdlib
  libxtables12 media-types pigz python3 python3-minimal python3.10
  python3.10-minimal xfsprogs xz-utils
The following packages will be upgraded:
  openssl
1 upgraded, 25 newly installed, 0 to remove and 27 not upgraded.
Need to get 20.1 MB of archives.
After this operation, 68.2 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3.10-minimal amd64 3.10.12-1~22.04.3 [812 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3.10-minimal amd64 3.10.12-1~22.04.3 [2,242 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-minimal amd64 3.10.6-1~22.04 [24.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 media-types all 7.0.0 [25.5 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 libmpdec3 amd64 2.5.1-2build2 [86.8 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3.10-stdlib amd64 3.10.12-1~22.04.3 [1,848 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3.10 amd64 3.10.12-1~22.04.3 [508 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3-stdlib amd64 3.10.6-1~22.04 [6,910 B]
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3 amd64 3.10.6-1~22.04 [22.8 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/universe amd64 pigz amd64 2.6-1 [63.6 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/main amd64 libdevmapper1.02.1 amd64 2:1.02.175-2.1ubuntu4 [139 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 libicu70 amd64 70.1-2 [10.6 MB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libip4tc2 amd64 1.8.7-1ubuntu5.2 [19.9 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy/main amd64 libmnl0 amd64 1.0.4-3build2 [13.2 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libxtables12 amd64 1.8.7-1ubuntu5.2 [31.3 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 openssl amd64 3.0.2-0ubuntu1.15 [1,186 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libip6tc2 amd64 1.8.7-1ubuntu5.2 [20.3 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy/main amd64 libnfnetlink0 amd64 1.0.1-3build3 [14.6 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy/main amd64 libnetfilter-conntrack3 amd64 1.0.9-1 [45.3 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy/main amd64 libnftnl11 amd64 1.2.1-1build1 [65.5 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 iptables amd64 1.8.7-1ubuntu5.2 [455 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy/main amd64 xz-utils amd64 5.2.5-2ubuntu1 [84.8 kB]
Get:23 http://archive.ubuntu.com/ubuntu jammy/main amd64 liblzo2-2 amd64 2.10-2build3 [53.7 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy/main amd64 btrfs-progs amd64 5.16.2-1 [824 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy/main amd64 libinih1 amd64 53-1ubuntu3 [7,250 B]
Get:26 http://archive.ubuntu.com/ubuntu jammy/main amd64 xfsprogs amd64 5.13.0-1ubuntu2 [870 kB]
Fetched 20.1 MB in 2s (11.8 MB/s)
Selecting previously unselected package libpython3.10-minimal:amd64.
(Reading database ... 11427 files and directories currently installed.)
Preparing to unpack .../libpython3.10-minimal_3.10.12-1~22.04.3_amd64.deb ...
Unpacking libpython3.10-minimal:amd64 (3.10.12-1~22.04.3) ...
Selecting previously unselected package python3.10-minimal.
Preparing to unpack .../python3.10-minimal_3.10.12-1~22.04.3_amd64.deb ...
Unpacking python3.10-minimal (3.10.12-1~22.04.3) ...
Setting up libpython3.10-minimal:amd64 (3.10.12-1~22.04.3) ...
Setting up python3.10-minimal (3.10.12-1~22.04.3) ...
Selecting previously unselected package python3-minimal.
(Reading database ... 11723 files and directories currently installed.)
Preparing to unpack .../0-python3-minimal_3.10.6-1~22.04_amd64.deb ...
Unpacking python3-minimal (3.10.6-1~22.04) ...
Selecting previously unselected package media-types.
Preparing to unpack .../1-media-types_7.0.0_all.deb ...
Unpacking media-types (7.0.0) ...
Selecting previously unselected package libmpdec3:amd64.
Preparing to unpack .../2-libmpdec3_2.5.1-2build2_amd64.deb ...
Unpacking libmpdec3:amd64 (2.5.1-2build2) ...
Selecting previously unselected package libpython3.10-stdlib:amd64.
Preparing to unpack .../3-libpython3.10-stdlib_3.10.12-1~22.04.3_amd64.deb ...
Unpacking libpython3.10-stdlib:amd64 (3.10.12-1~22.04.3) ...
Selecting previously unselected package python3.10.
Preparing to unpack .../4-python3.10_3.10.12-1~22.04.3_amd64.deb ...
Unpacking python3.10 (3.10.12-1~22.04.3) ...
Selecting previously unselected package libpython3-stdlib:amd64.
Preparing to unpack .../5-libpython3-stdlib_3.10.6-1~22.04_amd64.deb ...
Unpacking libpython3-stdlib:amd64 (3.10.6-1~22.04) ...
Setting up python3-minimal (3.10.6-1~22.04) ...
Selecting previously unselected package python3.
(Reading database ... 12125 files and directories currently installed.)
Preparing to unpack .../00-python3_3.10.6-1~22.04_amd64.deb ...
Unpacking python3 (3.10.6-1~22.04) ...
Selecting previously unselected package pigz.
Preparing to unpack .../01-pigz_2.6-1_amd64.deb ...
Unpacking pigz (2.6-1) ...
Selecting previously unselected package libdevmapper1.02.1:amd64.
Preparing to unpack .../02-libdevmapper1.02.1_2%3a1.02.175-2.1ubuntu4_amd64.deb ...
Unpacking libdevmapper1.02.1:amd64 (2:1.02.175-2.1ubuntu4) ...
Selecting previously unselected package libicu70:amd64.
Preparing to unpack .../03-libicu70_70.1-2_amd64.deb ...
Unpacking libicu70:amd64 (70.1-2) ...
Selecting previously unselected package libip4tc2:amd64.
Preparing to unpack .../04-libip4tc2_1.8.7-1ubuntu5.2_amd64.deb ...
Unpacking libip4tc2:amd64 (1.8.7-1ubuntu5.2) ...
Selecting previously unselected package libmnl0:amd64.
Preparing to unpack .../05-libmnl0_1.0.4-3build2_amd64.deb ...
Unpacking libmnl0:amd64 (1.0.4-3build2) ...
Selecting previously unselected package libxtables12:amd64.
Preparing to unpack .../06-libxtables12_1.8.7-1ubuntu5.2_amd64.deb ...
Unpacking libxtables12:amd64 (1.8.7-1ubuntu5.2) ...
Preparing to unpack .../07-openssl_3.0.2-0ubuntu1.15_amd64.deb ...
Unpacking openssl (3.0.2-0ubuntu1.15) over (3.0.2-0ubuntu1.13) ...
Selecting previously unselected package libip6tc2:amd64.
Preparing to unpack .../08-libip6tc2_1.8.7-1ubuntu5.2_amd64.deb ...
Unpacking libip6tc2:amd64 (1.8.7-1ubuntu5.2) ...
Selecting previously unselected package libnfnetlink0:amd64.
Preparing to unpack .../09-libnfnetlink0_1.0.1-3build3_amd64.deb ...
Unpacking libnfnetlink0:amd64 (1.0.1-3build3) ...
Selecting previously unselected package libnetfilter-conntrack3:amd64.
Preparing to unpack .../10-libnetfilter-conntrack3_1.0.9-1_amd64.deb ...
Unpacking libnetfilter-conntrack3:amd64 (1.0.9-1) ...
Selecting previously unselected package libnftnl11:amd64.
Preparing to unpack .../11-libnftnl11_1.2.1-1build1_amd64.deb ...
Unpacking libnftnl11:amd64 (1.2.1-1build1) ...
Selecting previously unselected package iptables.
Preparing to unpack .../12-iptables_1.8.7-1ubuntu5.2_amd64.deb ...
Unpacking iptables (1.8.7-1ubuntu5.2) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../13-xz-utils_5.2.5-2ubuntu1_amd64.deb ...
Unpacking xz-utils (5.2.5-2ubuntu1) ...
Selecting previously unselected package liblzo2-2:amd64.
Preparing to unpack .../14-liblzo2-2_2.10-2build3_amd64.deb ...
Unpacking liblzo2-2:amd64 (2.10-2build3) ...
Selecting previously unselected package btrfs-progs.
Preparing to unpack .../15-btrfs-progs_5.16.2-1_amd64.deb ...
Unpacking btrfs-progs (5.16.2-1) ...
Selecting previously unselected package libinih1:amd64.
Preparing to unpack .../16-libinih1_53-1ubuntu3_amd64.deb ...
Unpacking libinih1:amd64 (53-1ubuntu3) ...
Selecting previously unselected package xfsprogs.
Preparing to unpack .../17-xfsprogs_5.13.0-1ubuntu2_amd64.deb ...
Unpacking xfsprogs (5.13.0-1ubuntu2) ...
Setting up libip4tc2:amd64 (1.8.7-1ubuntu5.2) ...
Setting up media-types (7.0.0) ...
Setting up libip6tc2:amd64 (1.8.7-1ubuntu5.2) ...
Setting up libinih1:amd64 (53-1ubuntu3) ...
Setting up liblzo2-2:amd64 (2.10-2build3) ...
Setting up xz-utils (5.2.5-2ubuntu1) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist
Setting up libmnl0:amd64 (1.0.4-3build2) ...
Setting up libxtables12:amd64 (1.8.7-1ubuntu5.2) ...
Setting up libdevmapper1.02.1:amd64 (2:1.02.175-2.1ubuntu4) ...
Setting up pigz (2.6-1) ...
Setting up libnfnetlink0:amd64 (1.0.1-3build3) ...
Setting up libmpdec3:amd64 (2.5.1-2build2) ...
Setting up openssl (3.0.2-0ubuntu1.15) ...
Setting up libicu70:amd64 (70.1-2) ...
Setting up btrfs-progs (5.16.2-1) ...
Setting up libnftnl11:amd64 (1.2.1-1build1) ...
Setting up libpython3.10-stdlib:amd64 (3.10.12-1~22.04.3) ...
Setting up libnetfilter-conntrack3:amd64 (1.0.9-1) ...
Setting up libpython3-stdlib:amd64 (3.10.6-1~22.04) ...
Setting up python3.10 (3.10.12-1~22.04.3) ...
Setting up iptables (1.8.7-1ubuntu5.2) ...
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/iptables-nft to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-nft to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode
update-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode
Setting up python3 (3.10.6-1~22.04) ...
Setting up xfsprogs (5.13.0-1ubuntu2) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
[custom-init] No custom files found, skipping...
mount: /sys/kernel/security: permission denied.
mount: /tmp: permission denied.
mkdir: cannot create directory ‘/sys/fs/cgroup/init’: Read-only file system
./run.user: line 25: /sys/fs/cgroup/init/cgroup.procs: No such file or directory
./run.user: line 27: /sys/fs/cgroup/cgroup.subtree_control: Read-only file system
[2024-03-18T11:19:12.805Z] info  Wrote default config file to /config/.config/code-server/config.yaml
[2024-03-18T11:19:13.283Z] info  code-server 4.21.0 84ca27278b68150e22d25ec9183a4835239b6e44
[2024-03-18T11:19:13.284Z] info  Using user-data-dir /config/data
[2024-03-18T11:19:13.369Z] info  Using config file /config/.config/code-server/config.yaml
[2024-03-18T11:19:13.370Z] info  HTTP server listening on http://0.0.0.0:8443/
[2024-03-18T11:19:13.371Z] info    - Authentication is enabled
[2024-03-18T11:19:13.372Z] info      - Using password from $PASSWORD
[2024-03-18T11:19:13.372Z] info    - Not serving HTTPS
[2024-03-18T11:19:13.373Z] info  Session server listening on /config/data/code-server-ipc.sock
[11:19:14] 

[11:19:14] Extension host agent started.
[11:19:14] Started initializing default profile extensions in extensions installation folder. file:///config/extensions
[11:19:14] Completed initializing default profile extensions in extensions installation folder. file:///config/extensions
[11:19:14] [172.18.0.1][0e3dc0a7][ManagementConnection] Unknown reconnection token (never seen).
mount: /sys/kernel/security: permission denied.
mount: /tmp: permission denied.
mkdir: cannot create directory ‘/sys/fs/cgroup/init’: Read-only file system
./run.user: line 25: /sys/fs/cgroup/init/cgroup.procs: No such file or directory
./run.user: line 27: /sys/fs/cgroup/cgroup.subtree_control: Read-only file system
mount: /sys/kernel/security: permission denied.
mount: /tmp: permission denied.
mkdir: cannot create directory ‘/sys/fs/cgroup/init’: Read-only file system
./run.user: line 25: /sys/fs/cgroup/init/cgroup.procs: No such file or directory
./run.user: line 27: /sys/fs/cgroup/cgroup.subtree_control: Read-only file system
mount: /sys/kernel/security: permission denied.
mount: /tmp: permission denied.
mkdir: cannot create directory ‘/sys/fs/cgroup/init’: Read-only file system
./run.user: line 25: /sys/fs/cgroup/init/cgroup.procs: No such file or directory
./run.user: line 27: /sys/fs/cgroup/cgroup.subtree_control: Read-only file system
mount: /sys/kernel/security: permission denied.
mount: /tmp: permission denied.
mkdir: cannot create directory ‘/sys/fs/cgroup/init’: Read-only file system
./run.user: line 25: /sys/fs/cgroup/init/cgroup.procs: No such file or directory
./run.user: line 27: /sys/fs/cgroup/cgroup.subtree_control: Read-only file system
thespad commented 5 months ago

As per the mod readme

In the container's docker arguments,

  • Set an environment variable DOCKER_MODS=linuxserver/mods:universal-docker-in-docker
  • Set the privileged option for the container
acondura commented 5 months ago

I added privileged: true in docker-compose.yml and restarted the code-server container.

This time around, I didn't get any more errors in container log but when trying to use 'docker ps' inside code-server container, I got:

permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.44/containers/json": dial unix /var/run/docker.sock: connect: permission denied

I'm confused, though. Why would privileged help? I mean, I have:

I just want to get inside the code-server container from a URL (which I can) and then start building 2 containers inside it for some dev work.

thespad commented 5 months ago

In order to perform the necessary cgroup and namespace operations required to run docker containers, the container you're running them in needs to be privileged otherwise it lacks the necessary permissions on the host.

As for running docker commands you either need to add the abc user to the docker group or use sudo as by default non-root users don't have permissions to interact with docker.

Roxedus commented 5 months ago

Privileged is a requirement for docker in docker, as also noted on the official docker image


  • How docker service was installed: Not relevant. I'm trying to use Docker in Docker.

This is incorrect, its highly relevant.


We need new logs to determine why the group part of the init is not doing what its supposed to do.

acondura commented 5 months ago

Well, I used the Ubuntu installation from https://docs.docker.com/engine/install/ubuntu.

In order to perform the necessary cgroup and namespace operations required to run docker containers, the container you're running them in needs to be privileged otherwise it lacks the necessary permissions on the host.

Please excuse my ignorance and for insisting on this, it's my first time trying to use docker in docker. I still don't understand why the host matters, since I want to start a new docker daemon inside the code-server container and work with that inside the container.

As for running docker commands you either need to add the abc user to the docker group or use sudo as by default non-root users don't have permissions to interact with docker.

I checked and abc user was already added to the docker group. I assume it was done by the mod installation.

The latest logs are:

[mod-init] Running Docker Modification Logic [mod-init] Adding linuxserver/mods:universal-docker-in-docker to container [mod-init] Downloading linuxserver/mods:universal-docker-in-docker from lscr.io [mod-init] Installing linuxserver/mods:universal-docker-in-docker [mod-init] linuxserver/mods:universal-docker-in-docker applied to container [migrations] started [migrations] no migrations found usermod: no changes ───────────────────────────────────────

  ██╗     ███████╗██╗ ██████╗
  ██║     ██╔════╝██║██╔═══██╗
  ██║     ███████╗██║██║   ██║
  ██║     ╚════██║██║██║   ██║
  ███████╗███████║██║╚██████╔╝
  ╚══════╝╚══════╝╚═╝ ╚═════╝

Brought to you by linuxserver.io ───────────────────────────────────────

To support LSIO projects visit: https://www.linuxserver.io/donate/

─────────────────────────────────────── GID/UID ───────────────────────────────────────

User UID: 911 User GID: 911 ───────────────────────────────────────

setting up sudo access adding abc to sudoers setting sudo password using SUDO_PASSWORD env var New password: Retype new password: passwd: password updated successfully installing docker and docker compose Adding docker-in-docker dependency packages to install list Copying over docker and docker-compose binaries [mod-init] Installing all mod packages Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB] Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB] Get:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Get:4 http://archive.ubuntu.com/ubuntu jammy/main Sources [1,668 kB] Get:5 http://archive.ubuntu.com/ubuntu jammy/universe Sources [22.0 MB] Get:6 http://archive.ubuntu.com/ubuntu jammy/multiverse Sources [361 kB] Get:7 http://archive.ubuntu.com/ubuntu jammy/restricted Sources [28.2 kB] Get:8 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB] Get:9 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB] Get:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1,792 kB] Get:11 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB] Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/universe Sources [405 kB] Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Sources [21.8 kB] Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main Sources [602 kB] Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Sources [71.0 kB] Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1,353 kB] Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [2,045 kB] Get:18 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1,879 kB] Get:19 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [50.4 kB] Get:20 http://archive.ubuntu.com/ubuntu jammy-security/universe Sources [234 kB] Get:21 http://archive.ubuntu.com/ubuntu jammy-security/multiverse Sources [12.1 kB] Get:22 http://archive.ubuntu.com/ubuntu jammy-security/restricted Sources [67.0 kB] Get:23 http://archive.ubuntu.com/ubuntu jammy-security/main Sources [323 kB] Get:24 http://archive.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1,079 kB] Get:25 http://archive.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1,961 kB] Get:26 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1,569 kB] Get:27 http://archive.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.6 kB] Fetched 55.9 MB in 4s (13.6 MB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... ca-certificates is already the newest version (20230311ubuntu0.22.04.1). ca-certificates set to manually installed. curl is already the newest version (7.81.0-1ubuntu1.15). e2fsprogs is already the newest version (1.46.5-2ubuntu1.1). openssh-client is already the newest version (1:8.9p1-3ubuntu0.6). openssh-client set to manually installed. The following additional packages will be installed: libdevmapper1.02.1 libicu70 libinih1 libip4tc2 libip6tc2 liblzo2-2 libmnl0 libmpdec3 libnetfilter-conntrack3 libnfnetlink0 libnftnl11 libpython3-stdlib libpython3.10-minimal libpython3.10-stdlib libxtables12 media-types python3 python3-minimal python3.10 python3.10-minimal Suggested packages: duperemove firewalld kmod nftables python3-doc python3-tk python3-venv python3.10-venv python3.10-doc binutils binfmt-support xfsdump acl attr quota Recommended packages: dmsetup The following NEW packages will be installed: btrfs-progs iptables libdevmapper1.02.1 libicu70 libinih1 libip4tc2 libip6tc2 liblzo2-2 libmnl0 libmpdec3 libnetfilter-conntrack3 libnfnetlink0 libnftnl11 libpython3-stdlib libpython3.10-minimal libpython3.10-stdlib libxtables12 media-types pigz python3 python3-minimal python3.10 python3.10-minimal xfsprogs xz-utils The following packages will be upgraded: openssl 1 upgraded, 25 newly installed, 0 to remove and 27 not upgraded. Need to get 20.1 MB of archives. After this operation, 68.2 MB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3.10-minimal amd64 3.10.12-1~22.04.3 [812 kB] Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3.10-minimal amd64 3.10.12-1~22.04.3 [2,242 kB] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-minimal amd64 3.10.6-1~22.04 [24.3 kB] Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 media-types all 7.0.0 [25.5 kB] Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 libmpdec3 amd64 2.5.1-2build2 [86.8 kB] Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3.10-stdlib amd64 3.10.12-1~22.04.3 [1,848 kB] Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3.10 amd64 3.10.12-1~22.04.3 [508 kB] Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3-stdlib amd64 3.10.6-1~22.04 [6,910 B] Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3 amd64 3.10.6-1~22.04 [22.8 kB] Get:10 http://archive.ubuntu.com/ubuntu jammy/universe amd64 pigz amd64 2.6-1 [63.6 kB] Get:11 http://archive.ubuntu.com/ubuntu jammy/main amd64 libdevmapper1.02.1 amd64 2:1.02.175-2.1ubuntu4 [139 kB] Get:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 libicu70 amd64 70.1-2 [10.6 MB] Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libip4tc2 amd64 1.8.7-1ubuntu5.2 [19.9 kB] Get:14 http://archive.ubuntu.com/ubuntu jammy/main amd64 libmnl0 amd64 1.0.4-3build2 [13.2 kB] Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libxtables12 amd64 1.8.7-1ubuntu5.2 [31.3 kB] Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 openssl amd64 3.0.2-0ubuntu1.15 [1,186 kB] Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libip6tc2 amd64 1.8.7-1ubuntu5.2 [20.3 kB] Get:18 http://archive.ubuntu.com/ubuntu jammy/main amd64 libnfnetlink0 amd64 1.0.1-3build3 [14.6 kB] Get:19 http://archive.ubuntu.com/ubuntu jammy/main amd64 libnetfilter-conntrack3 amd64 1.0.9-1 [45.3 kB] Get:20 http://archive.ubuntu.com/ubuntu jammy/main amd64 libnftnl11 amd64 1.2.1-1build1 [65.5 kB] Get:21 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 iptables amd64 1.8.7-1ubuntu5.2 [455 kB] Get:22 http://archive.ubuntu.com/ubuntu jammy/main amd64 xz-utils amd64 5.2.5-2ubuntu1 [84.8 kB] Get:23 http://archive.ubuntu.com/ubuntu jammy/main amd64 liblzo2-2 amd64 2.10-2build3 [53.7 kB] Get:24 http://archive.ubuntu.com/ubuntu jammy/main amd64 btrfs-progs amd64 5.16.2-1 [824 kB] Get:25 http://archive.ubuntu.com/ubuntu jammy/main amd64 libinih1 amd64 53-1ubuntu3 [7,250 B] Get:26 http://archive.ubuntu.com/ubuntu jammy/main amd64 xfsprogs amd64 5.13.0-1ubuntu2 [870 kB] Fetched 20.1 MB in 5s (3,781 kB/s) Selecting previously unselected package libpython3.10-minimal:amd64. (Reading database ... 11427 files and directories currently installed.) Preparing to unpack .../libpython3.10-minimal_3.10.12-1~22.04.3_amd64.deb ... Unpacking libpython3.10-minimal:amd64 (3.10.12-1~22.04.3) ... Selecting previously unselected package python3.10-minimal. Preparing to unpack .../python3.10-minimal_3.10.12-1~22.04.3_amd64.deb ... Unpacking python3.10-minimal (3.10.12-1~22.04.3) ... Setting up libpython3.10-minimal:amd64 (3.10.12-1~22.04.3) ... Setting up python3.10-minimal (3.10.12-1~22.04.3) ... Selecting previously unselected package python3-minimal. (Reading database ... 11723 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.10.6-1~22.04_amd64.deb ... Unpacking python3-minimal (3.10.6-1~22.04) ... Selecting previously unselected package media-types. Preparing to unpack .../1-media-types_7.0.0_all.deb ... Unpacking media-types (7.0.0) ... Selecting previously unselected package libmpdec3:amd64. Preparing to unpack .../2-libmpdec3_2.5.1-2build2_amd64.deb ... Unpacking libmpdec3:amd64 (2.5.1-2build2) ... Selecting previously unselected package libpython3.10-stdlib:amd64. Preparing to unpack .../3-libpython3.10-stdlib_3.10.12-1~22.04.3_amd64.deb ... Unpacking libpython3.10-stdlib:amd64 (3.10.12-1~22.04.3) ... Selecting previously unselected package python3.10. Preparing to unpack .../4-python3.10_3.10.12-1~22.04.3_amd64.deb ... Unpacking python3.10 (3.10.12-1~22.04.3) ... Selecting previously unselected package libpython3-stdlib:amd64. Preparing to unpack .../5-libpython3-stdlib_3.10.6-1~22.04_amd64.deb ... Unpacking libpython3-stdlib:amd64 (3.10.6-1~22.04) ... Setting up python3-minimal (3.10.6-1~22.04) ... Selecting previously unselected package python3. (Reading database ... 12125 files and directories currently installed.) Preparing to unpack .../00-python3_3.10.6-1~22.04_amd64.deb ... Unpacking python3 (3.10.6-1~22.04) ... Selecting previously unselected package pigz. Preparing to unpack .../01-pigz_2.6-1_amd64.deb ... Unpacking pigz (2.6-1) ... Selecting previously unselected package libdevmapper1.02.1:amd64. Preparing to unpack .../02-libdevmapper1.02.1_2%3a1.02.175-2.1ubuntu4_amd64.deb ... Unpacking libdevmapper1.02.1:amd64 (2:1.02.175-2.1ubuntu4) ... Selecting previously unselected package libicu70:amd64. Preparing to unpack .../03-libicu70_70.1-2_amd64.deb ... Unpacking libicu70:amd64 (70.1-2) ... Selecting previously unselected package libip4tc2:amd64. Preparing to unpack .../04-libip4tc2_1.8.7-1ubuntu5.2_amd64.deb ... Unpacking libip4tc2:amd64 (1.8.7-1ubuntu5.2) ... Selecting previously unselected package libmnl0:amd64. Preparing to unpack .../05-libmnl0_1.0.4-3build2_amd64.deb ... Unpacking libmnl0:amd64 (1.0.4-3build2) ... Selecting previously unselected package libxtables12:amd64. Preparing to unpack .../06-libxtables12_1.8.7-1ubuntu5.2_amd64.deb ... Unpacking libxtables12:amd64 (1.8.7-1ubuntu5.2) ... Preparing to unpack .../07-openssl_3.0.2-0ubuntu1.15_amd64.deb ... Unpacking openssl (3.0.2-0ubuntu1.15) over (3.0.2-0ubuntu1.13) ... Selecting previously unselected package libip6tc2:amd64. Preparing to unpack .../08-libip6tc2_1.8.7-1ubuntu5.2_amd64.deb ... Unpacking libip6tc2:amd64 (1.8.7-1ubuntu5.2) ... Selecting previously unselected package libnfnetlink0:amd64. Preparing to unpack .../09-libnfnetlink0_1.0.1-3build3_amd64.deb ... Unpacking libnfnetlink0:amd64 (1.0.1-3build3) ... Selecting previously unselected package libnetfilter-conntrack3:amd64. Preparing to unpack .../10-libnetfilter-conntrack3_1.0.9-1_amd64.deb ... Unpacking libnetfilter-conntrack3:amd64 (1.0.9-1) ... Selecting previously unselected package libnftnl11:amd64. Preparing to unpack .../11-libnftnl11_1.2.1-1build1_amd64.deb ... Unpacking libnftnl11:amd64 (1.2.1-1build1) ... Selecting previously unselected package iptables. Preparing to unpack .../12-iptables_1.8.7-1ubuntu5.2_amd64.deb ... Unpacking iptables (1.8.7-1ubuntu5.2) ... Selecting previously unselected package xz-utils. Preparing to unpack .../13-xz-utils_5.2.5-2ubuntu1_amd64.deb ... Unpacking xz-utils (5.2.5-2ubuntu1) ... Selecting previously unselected package liblzo2-2:amd64. Preparing to unpack .../14-liblzo2-2_2.10-2build3_amd64.deb ... Unpacking liblzo2-2:amd64 (2.10-2build3) ... Selecting previously unselected package btrfs-progs. Preparing to unpack .../15-btrfs-progs_5.16.2-1_amd64.deb ... Unpacking btrfs-progs (5.16.2-1) ... Selecting previously unselected package libinih1:amd64. Preparing to unpack .../16-libinih1_53-1ubuntu3_amd64.deb ... Unpacking libinih1:amd64 (53-1ubuntu3) ... Selecting previously unselected package xfsprogs. Preparing to unpack .../17-xfsprogs_5.13.0-1ubuntu2_amd64.deb ... Unpacking xfsprogs (5.13.0-1ubuntu2) ... Setting up libip4tc2:amd64 (1.8.7-1ubuntu5.2) ... Setting up media-types (7.0.0) ... Setting up libip6tc2:amd64 (1.8.7-1ubuntu5.2) ... Setting up libinih1:amd64 (53-1ubuntu3) ... Setting up liblzo2-2:amd64 (2.10-2build3) ... Setting up xz-utils (5.2.5-2ubuntu1) ... update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist Setting up libmnl0:amd64 (1.0.4-3build2) ... Setting up libxtables12:amd64 (1.8.7-1ubuntu5.2) ... Setting up libdevmapper1.02.1:amd64 (2:1.02.175-2.1ubuntu4) ... Setting up pigz (2.6-1) ... Setting up libnfnetlink0:amd64 (1.0.1-3build3) ... Setting up libmpdec3:amd64 (2.5.1-2build2) ... Setting up openssl (3.0.2-0ubuntu1.15) ... Setting up libicu70:amd64 (70.1-2) ... Setting up btrfs-progs (5.16.2-1) ... Setting up libnftnl11:amd64 (1.2.1-1build1) ... Setting up libpython3.10-stdlib:amd64 (3.10.12-1~22.04.3) ... Setting up libnetfilter-conntrack3:amd64 (1.0.9-1) ... Setting up libpython3-stdlib:amd64 (3.10.6-1~22.04) ... Setting up python3.10 (3.10.12-1~22.04.3) ... Setting up iptables (1.8.7-1ubuntu5.2) ... update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode update-alternatives: using /usr/sbin/iptables-nft to provide /usr/sbin/iptables (iptables) in auto mode update-alternatives: using /usr/sbin/ip6tables-nft to provide /usr/sbin/ip6tables (ip6tables) in auto mode update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode update-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode Setting up python3 (3.10.6-1~22.04) ... Setting up xfsprogs (5.13.0-1ubuntu2) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... [custom-init] No custom files found, skipping... sed: couldn't flush stdout: Device or resource busy [2024-03-18T12:56:31.843Z] info Wrote default config file to /config/.config/code-server/config.yaml [2024-03-18T12:56:32.403Z] info code-server 4.21.0 84ca27278b68150e22d25ec9183a4835239b6e44 [2024-03-18T12:56:32.405Z] info Using user-data-dir /config/data [2024-03-18T12:56:32.432Z] info Using config file /config/.config/code-server/config.yaml [2024-03-18T12:56:32.433Z] info HTTP server listening on http://0.0.0.0:8443/ [2024-03-18T12:56:32.433Z] info - Authentication is enabled [2024-03-18T12:56:32.434Z] info - Using password from $PASSWORD [2024-03-18T12:56:32.434Z] info - Not serving HTTPS [2024-03-18T12:56:32.435Z] info Session server listening on /config/data/code-server-ipc.sock Enabling QEMU Unable to find image 'multiarch/qemu-user-static:latest' locally latest: Pulling from multiarch/qemu-user-static 205dae5015e7: Pulling fs layer 816739e52091: Pulling fs layer 30abb83a18eb: Pulling fs layer 0657daef200b: Pulling fs layer 30c9c93f40b9: Pulling fs layer 0657daef200b: Waiting 30c9c93f40b9: Waiting [12:56:33]

[12:56:33] Extension host agent started. [12:56:33] Started initializing default profile extensions in extensions installation folder. file:///config/extensions [12:56:33] Completed initializing default profile extensions in extensions installation folder. file:///config/extensions 30abb83a18eb: Download complete 816739e52091: Download complete 205dae5015e7: Verifying Checksum 205dae5015e7: Download complete 0657daef200b: Verifying Checksum 0657daef200b: Download complete 205dae5015e7: Pull complete 816739e52091: Pull complete [12:56:34] [172.18.0.1][63530f7a][ExtensionHostConnection] Unknown reconnection token (never seen). 30abb83a18eb: Pull complete 0657daef200b: Pull complete [12:56:35] [172.18.0.1][e06d784b][ManagementConnection] Unknown reconnection token (never seen). 30c9c93f40b9: Verifying Checksum 30c9c93f40b9: Download complete 30c9c93f40b9: Pull complete Digest: sha256:fe60359c92e86a43cc87b3d906006245f77bfc0565676b80004cc666e4feb9f0 Status: Downloaded newer image for multiarch/qemu-user-static:latest Setting /usr/bin/qemu-alpha-static as binfmt interpreter for alpha Setting /usr/bin/qemu-arm-static as binfmt interpreter for arm Setting /usr/bin/qemu-armeb-static as binfmt interpreter for armeb Setting /usr/bin/qemu-sparc-static as binfmt interpreter for sparc Setting /usr/bin/qemu-sparc32plus-static as binfmt interpreter for sparc32plus Setting /usr/bin/qemu-sparc64-static as binfmt interpreter for sparc64 Setting /usr/bin/qemu-ppc-static as binfmt interpreter for ppc Setting /usr/bin/qemu-ppc64-static as binfmt interpreter for ppc64 Setting /usr/bin/qemu-ppc64le-static as binfmt interpreter for ppc64le Setting /usr/bin/qemu-m68k-static as binfmt interpreter for m68k Setting /usr/bin/qemu-mips-static as binfmt interpreter for mips Setting /usr/bin/qemu-mipsel-static as binfmt interpreter for mipsel Setting /usr/bin/qemu-mipsn32-static as binfmt interpreter for mipsn32 Setting /usr/bin/qemu-mipsn32el-static as binfmt interpreter for mipsn32el Setting /usr/bin/qemu-mips64-static as binfmt interpreter for mips64 Setting /usr/bin/qemu-mips64el-static as binfmt interpreter for mips64el Setting /usr/bin/qemu-sh4-static as binfmt interpreter for sh4 Setting /usr/bin/qemu-sh4eb-static as binfmt interpreter for sh4eb Setting /usr/bin/qemu-s390x-static as binfmt interpreter for s390x Setting /usr/bin/qemu-aarch64-static as binfmt interpreter for aarch64 Setting /usr/bin/qemu-aarch64_be-static as binfmt interpreter for aarch64_be Setting /usr/bin/qemu-hppa-static as binfmt interpreter for hppa Setting /usr/bin/qemu-riscv32-static as binfmt interpreter for riscv32 Setting /usr/bin/qemu-riscv64-static as binfmt interpreter for riscv64 Setting /usr/bin/qemu-xtensa-static as binfmt interpreter for xtensa Setting /usr/bin/qemu-xtensaeb-static as binfmt interpreter for xtensaeb Setting /usr/bin/qemu-microblaze-static as binfmt interpreter for microblaze Setting /usr/bin/qemu-microblazeel-static as binfmt interpreter for microblazeel Setting /usr/bin/qemu-or1k-static as binfmt interpreter for or1k Setting /usr/bin/qemu-hexagon-static as binfmt interpreter for hexagon [ls.io-init] done. File not found: /app/code-server/lib/vscode/out/vsda_bg.wasm File not found: /app/code-server/lib/vscode/out/vsda.js [12:57:05] [172.18.0.1][f246ac5c][ManagementConnection] New connection established. [12:57:08] [172.18.0.1][0c22b16d][ExtensionHostConnection] New connection established. [12:57:08] [172.18.0.1][0c22b16d][ExtensionHostConnection] <1657> Launched Extension Host Process. [13:40:01] [172.18.0.1][f246ac5c][ManagementConnection] The client has reconnected. [13:40:01] [172.18.0.1][0c22b16d][ExtensionHostConnection] The client has reconnected. [13:40:51] [172.18.0.1][0c22b16d][ExtensionHostConnection] The client has reconnected. [13:40:52] [172.18.0.1][f246ac5c][ManagementConnection] The client has reconnected.

Roxedus commented 5 months ago

The host matters, as it could have been a snap based install, which does not always work well with privileged. Since the mod manages to run and set up qemu, docker itself is running, Does it work with sudo?

acondura commented 5 months ago

Wow, it worked. I didn't think to try that. Ok so, every time I want to use docker inside code-server, I need to use sudo.

Screenshot 2024-03-18 at 16 54 46
acondura commented 4 months ago

While the container is starting, I see this line at some point:

[custom-init] No custom files found, skipping...

Screenshot 2024-03-25 at 14 14 01

I was looking for a way to install OhMyBash (https://dev.to/jmunozl/oh-my-bash-in-ubuntu-2il). Is that custom-init file something I could use? I know about the OhMyZsh (https://github.com/linuxserver/docker-mods/tree/code-server-zsh) option to install. I prefer OhMyBash.

I can use a separate Dockerfile and build OhMyBash on top of lscr.io/linuxserver/code-server:latest but I was hoping I could avoid that.

thespad commented 4 months ago

https://linuxserver.io/custom

acondura commented 3 months ago

I figured it out, the /run folder also needed the docker group. This fixed it: chgrp docker /run

acondura commented 3 months ago

Curious that when I place the following in a custom init script:

!/bin/bash

chgrp docker /run

it won't work. The group of /run folder is still root, not docker. When I do it manually in the container, the group stays as docker.