Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Mounting docker.sock does not work since 1.8.2 #4

Closed
joelwurtz opened this issue Oct 29, 2015 · 3 comments
Closed

Mounting docker.sock does not work since 1.8.2 #4

joelwurtz opened this issue Oct 29, 2015 · 3 comments

Comments

@joelwurtz
Copy link

Hey,

Before upgrade mounting of the docker.sock was working it now fails and shutdown the container with a 255 exit code.

Does the location of the socket has changed ? Or this is the wanted behavior ? Anyway error output for that is not great (nothing is show) and user should be warned (i spent some hours figuring this out :( )

@sdurrheimer
Copy link
Contributor

Hi, I'm struggling with the same issue.

Here somes logs from /var/log/lxc/*.log:

      lxc-start 1450605541.975 ERROR    lxc_utils - utils.c:safe_mount:1453 - Permission denied - Mount of '/var/run/docker.sock' onto '/usr/lib/x86_64-linux-gnu/lxc///var/run/docker.sock' failed
      lxc-start 1450605541.975 ERROR    lxc_conf - conf.c:mount_entry:2051 - Permission denied - failed to mount '/var/run/docker.sock' on '/usr/lib/x86_64-linux-gnu/lxc///var/run/docker.sock'
      lxc-start 1450605541.975 ERROR    lxc_conf - conf.c:lxc_setup:4165 - failed to setup the mount entries for 'e4a22c1a17d8596c7abb2c8daf1e1a48719d91fb2148421967fdc7d175d38739'
      lxc-start 1450605541.975 ERROR    lxc_start - start.c:do_start:688 - failed to setup the container
      lxc-start 1450605541.975 ERROR    lxc_sync - sync.c:__sync_wait:51 - invalid sequence number 1. expected 2
      lxc-start 1450605542.038 ERROR    lxc_start - start.c:__lxc_start:1080 - failed to spawn 'e4a22c1a17d8596c7abb2c8daf1e1a48719d91fb2148421967fdc7d175d38739'
      lxc-start 1450605542.043 ERROR    lxc_start_ui - lxc_start.c:main:342 - The container failed to start.

EDIT: Seems to work when using -v /var/run/docker.sock:/run/docker.sock:ro instead of -v /var/run/docker.sock:/var/run/docker.sock:ro.
Maybe a drawback of using lxc execution driver.

@ngtuna
Copy link

ngtuna commented Mar 25, 2016

any luck ?

I got the same mount issue, but with mounting volume.

docker run -it --privileged -e OS_PLATFORM_ARG -e OS_ARCH_ARG -e DOCKER_TEST_HOST -e TESTDIRS -e TESTFLAGS -e TESTVERBOSE -v "/home/ubuntu/bundles:/bundles" "libcompose-dev" ./script/make.sh binary
WARNING: Your kernel does not support memory swappiness capabilities, memory swappiness discarded.
mount: permission denied

Could not mount /sys/kernel/security.

@vegasbrianc
Copy link

I use compose files which seems to mount and bind the volumes without issues. However version 2 compose files seemed to be not yet supported see issue #5

DominicLavery pushed a commit that referenced this issue Feb 25, 2022
[20.10] chrootarchive: don't create parent dirs outside of chroot
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants