Docker not working in custom image

Hi,

I am trying to setup an image with a newer docker version than the one, delivered by gitpod’s images.

Therefore I created a Docker-Image with the following Dockerfile:

FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive \
    && apt-get update \
    && apt-get -y install \
            apt-transport-https \
            ca-certificates \
            curl \
            gnupg \
            lsb-release \
    && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
    && echo \
         "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
         $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
    && apt-get update \
    && apt-get -y install docker-ce docker-ce-cli \
    && curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
    && chmod +x /usr/local/bin/docker-compose

But I am getting this error when trying to use docker on gitpod.io:

OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "proc" to rootfs at "/proc" caused: mount through procfd: operation not permitted: unknown

The version of docker seem to be what I expected it to be:

$ docker version
Client: Docker Engine - Community
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        f0df350
 Built:             Wed Jun  2 11:56:38 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:54:50 2021
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 gitpod:
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Any Idea, what I am doing wrong?

Best Regards
mschop

Hi @mschop, welcome to the Gitpod community :partying_face: The issue you are facing is described and can be tracked in [docker] Make Docker 20.10.2 work · Issue #3051 · gitpod-io/gitpod · GitHub

Thanks a lot @JohannesLandgraf!

Any idea when this will be fixed? We can not use gitpod for our docker setup without the 20.10 version. :thinking: .

Especially, since the issue is already 6 months old.

Hello! I am facing the same problems. Have you fixed them?

FROM ubuntu:21.04. 
ocker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "mqueue" to rootfs at "/dev/mqueue" caused: mount through procfd: operation not permitted: unknown.
ERRO[0002] error waiting for container: context canceled 

It is not yet fixed. You can subscribe this issue in order to see how it progresses.

I also have the same issue when installing Docker in an custom image. My version is same as what gitpod/workspace-full's Dockerfile said, it it’s still broken:

$ docker version
Client: Docker Engine - Community
 Version:           19.03.15
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        99e3ed8919
 Built:             Sat Jan 30 03:17:01 2021
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.15
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       99e3ed8919
  Built:            Sat Jan 30 03:15:30 2021
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          1.4.8
  GitCommit:        7eba5930496d9bbe375fdf71603e610ad737d2b2

My custom Dockerfile is on hydralite/.gitpod.Dockerfile at gitpodify · MadeByThePinsHub/hydralite · GitHub by the way.

I just tried to spin up your repo in a Gitpod workspace and your Dockerfile seemed to work for me! I guess you’ve found a fix? :slight_smile:

Happy Coding!

I have the same issue and I’m not customize my image.

$ docker run ubuntu
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "proc" to rootfs at "/proc" caused: mount through procfd: operation not permitted: unknown.
ERRO[0006] error waiting for container: context canceled 
1 Like

Please upvote and comment on this issue: [docker] Make Docker 20.10.2 work · Issue #3051 · gitpod-io/gitpod · GitHub

2 Likes