New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running docker inside an lxd container, works fine outside of container #3166

Closed
tpaluch opened this Issue Apr 11, 2017 · 8 comments

Comments

4 participants
@tpaluch

tpaluch commented Apr 11, 2017

Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
Kernel: 4.4.0-71-generic

docker version
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Mon Mar 27 17:14:09 2017
OS/Arch: linux/amd64

Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.7.5
Git commit: c6d412e
Built: Mon Mar 27 17:14:09 2017
OS/Arch: linux/amd64
Experimental: false

Fresh server, only ubuntu OS , lxd, and docker installed. I followed the installation instructions for docker from their docs page for the CE version: docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository

Running the "Hello-World" app inside the container as root user (sudo user same thing) gives the following error:

docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:252: getting pipe fds for pid 2391 caused "readlink /proc/2391/fd/0: permission denied"".

Note: I am using ZFS storage (with proper packages to enable ZFS on linux) for the LXD container, however I have not made any modifications to the docker installation -- just the defaults it installed with.

@brauner

This comment has been minimized.

Show comment
Hide comment
@brauner

brauner Apr 11, 2017

Member

Docket upstream is still missing a patch required to work out of the box in a LXD container. Until it is merged we recommend to use the Ubuntu Docker package.

Member

brauner commented Apr 11, 2017

Docket upstream is still missing a patch required to work out of the box in a LXD container. Until it is merged we recommend to use the Ubuntu Docker package.

@stgraber stgraber closed this Apr 11, 2017

@hooramin

This comment has been minimized.

Show comment
Hide comment
@hooramin

hooramin Oct 4, 2017

@brauner Do you mean apt-get install docker.io inside the container ? (for 14.04)

hooramin commented Oct 4, 2017

@brauner Do you mean apt-get install docker.io inside the container ? (for 14.04)

@stgraber

This comment has been minimized.

Show comment
Hide comment
@stgraber

stgraber Oct 4, 2017

Member

This recommendation no longer applies that was from back in April, the change in question is now part of the normal Docker deb packages.

Member

stgraber commented Oct 4, 2017

This recommendation no longer applies that was from back in April, the change in question is now part of the normal Docker deb packages.

@hooramin

This comment has been minimized.

Show comment
Hide comment
@hooramin

hooramin Oct 4, 2017

@stgraber but i have exactly the same problem as first post here in ubuntu 14.04 yet!

hooramin commented Oct 4, 2017

@stgraber but i have exactly the same problem as first post here in ubuntu 14.04 yet!

@hooramin

This comment has been minimized.

Show comment
Hide comment
@hooramin

hooramin Oct 5, 2017

should i open a new issue ?

hooramin commented Oct 5, 2017

should i open a new issue ?

@brauner

This comment has been minimized.

Show comment
Hide comment
@brauner

brauner Oct 5, 2017

Member

@hooramin, wait, are you saying that you are on Ubuntu 14.04 if so what is the Docker version you are using. Afaik, the minimal required version for Docker to work out of the box in LXD is 17.06 . (I'm not sure about their current numbering scheme though.) If you install that version you should be fine. The installation instruction can be found in the Docker documentation.

Member

brauner commented Oct 5, 2017

@hooramin, wait, are you saying that you are on Ubuntu 14.04 if so what is the Docker version you are using. Afaik, the minimal required version for Docker to work out of the box in LXD is 17.06 . (I'm not sure about their current numbering scheme though.) If you install that version you should be fine. The installation instruction can be found in the Docker documentation.

@hooramin

This comment has been minimized.

Show comment
Hide comment
@hooramin

hooramin Oct 5, 2017

@brauner I'm on ubuntu 16.04 and my container is ubuntu 14.04

root@container:~#  docker-compose --version
docker-compose version: 1.4.2
root@container:~# docker --version
Docker version 1.6.2, build 7c8fca2

I followed their document instructions and i got error , also i tried to do as lxd docker document
in both of them i got a same error as first post

root@container:~#  docker run hello-world
FATA[0000] Error response from daemon: Cannot start container ad0ea7fd6ffc14f4c6d48b30f70a13a38542e39f042c9e1fa256bd16852d6d51: [8] System error: write /sys/fs/cgroup/devices/docker/ad0ea7fd6ffc14f4c6d48b30f70a13a38542e39f042c9e1fa256bd16852d6d51/devices.allow: operation not permitted

hooramin commented Oct 5, 2017

@brauner I'm on ubuntu 16.04 and my container is ubuntu 14.04

root@container:~#  docker-compose --version
docker-compose version: 1.4.2
root@container:~# docker --version
Docker version 1.6.2, build 7c8fca2

I followed their document instructions and i got error , also i tried to do as lxd docker document
in both of them i got a same error as first post

root@container:~#  docker run hello-world
FATA[0000] Error response from daemon: Cannot start container ad0ea7fd6ffc14f4c6d48b30f70a13a38542e39f042c9e1fa256bd16852d6d51: [8] System error: write /sys/fs/cgroup/devices/docker/ad0ea7fd6ffc14f4c6d48b30f70a13a38542e39f042c9e1fa256bd16852d6d51/devices.allow: operation not permitted
@stgraber

This comment has been minimized.

Show comment
Hide comment
@stgraber

stgraber Oct 5, 2017

Member

Right, you're running a Docker version that's super old and that will not work inside LXD.

The instructions that said that docker.io from Ubuntu would work inside LXD were for Ubuntu 16.04, not 14.04. You either need Ubuntu's version of Docker at version 1.12 or higher, or the upstream Docker build which should be version 17.06 or higher.

Member

stgraber commented Oct 5, 2017

Right, you're running a Docker version that's super old and that will not work inside LXD.

The instructions that said that docker.io from Ubuntu would work inside LXD were for Ubuntu 16.04, not 14.04. You either need Ubuntu's version of Docker at version 1.12 or higher, or the upstream Docker build which should be version 17.06 or higher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment