buildkit: IO ERROR after enabling BuildKit
We enabled buildkit in our project by adding DOCKER_BUILDKIT=1 to our builds in docker-ce, and for one build we consistently get this error with it enabled (and no errors when buildkit is disabled):
#6 digest: sha256:30da00d34747eb29aac15c9bbd7386f198eea43c10752373b55a253ffd914d73
#6 name: "[2/3] RUN apk add --no-cache curl>=7.61.1-r1 openssh>=7.7_p1-r3 rsync>=3.1.3-r1 && mkdir -p ~/.ssh && chmod 700 ~/.ssh"
#6 started: 2018-12-10 13:56:21.911458752 +0000 UTC
#6 0.709 fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
#6 0.710 WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz: IO ERROR
#6 0.710 fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
#6 0.711 WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz: IO ERROR
#6 0.712 ERROR: unsatisfiable constraints:
#6 0.712 curl (missing):
#6 0.712 required by: world[curl>=7.61.1-r1]
#6 0.712 openssh (missing):
#6 0.712 required by: world[openssh>=7.7_p1-r3]
#6 0.712 rsync (missing):
#6 0.712 required by: world[rsync>=3.1.3-r1]
#6 completed: 2018-12-10 13:56:22.825157977 +0000 UTC
#6 duration: 913.699225ms
#6 error: "executor failed running [/bin/sh -c apk add --no-cache 'curl>=7.61.1-r1' 'openssh>=7.7_p1-r3' 'rsync>=3.1.3-r1' && mkdir -p ~/.ssh && chmod 700 ~/.ssh]: exit code: 3"
Do you have any ideas why, and how this can be solved ? Can I help anyhow to debug this ?
Thank you in advance !
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (4 by maintainers)
I don’t think it is generic docker issue, more likely a specific alpine image issue. I was able to constantly reproduce it by just trying to install packages(specifically g++/gcc) using the latest docker-ce on updated ubuntu 18.04:
The above problem is a permission issue, those files gives I/O error due to missing write permissions on this folders. I was able to test the theory by giving full write permissions to the /usr folder and trying the exact same command which was successfully due to the change. The problem is obviously in alpine image having improper permissions/ownership of the /usr folder.