1

I'm creating a Gitlab CI pipeline. The pipeline Should create a Container and publish it to a private container registry.

But creating the container with buildah bud -t ${CI_REGISTRY_IMAGE}/${CI_COMMIT_BRANCH}:${CI_COMMIT_SHA} . fails with:

Building docker image
Login Succeeded!
STEP 1: FROM parity/parity:v2.5.13-stable
Getting image source signatures
Copying blob sha256:72d77d7d5e84353d77d8a8f97d250120afe3650b85010137961560bce3a327d5
...     ...  ...
Copying blob sha256:8326361ddc6b9703a60c5675d1e9cc4b05dbe17473f8562c51b78a1f6507d838
Copying config sha256:36be05aeb6426b5615e2d6b71c9590dbc4a4d03ae7bcfa53edefdaeef28d3f41
Writing manifest to image destination
Storing signatures
time="2022-02-07T11:28:31Z" level=error msg="Error while applying layer: ApplyLayer exit status 1 stdout:  stderr: permission denied" 
error creating build container: The following failures happened while trying to pull image specified by "parity/parity:v2.5.13-stable" based on search registries in /etc/containers/registries.conf:
* "localhost/parity/parity:v2.5.13-stable": Error initializing source docker://localhost/parity/parity:v2.5.13-stable: pinging docker registry returned: Get https://localhost/v2/: dial tcp [::1]:443: connect: connection refused
* "docker.io/parity/parity:v2.5.13-stable": Error committing the finished image: error adding layer with blob "sha256:3386e6af03b043219225367632569465e5ecd47391d1f99a6d265e51bd463a83": ApplyLayer exit status 1 stdout:  stderr: permission denied
...

The problem seems to be in:

* "docker.io/parity/parity:v2.5.13-stable": Error committing the finished image: error adding layer with blob "sha256:3386e6af03b043219225367632569465e5ecd47391d1f99a6d265e51bd463a83": ApplyLayer exit status 1 stdout:  stderr: permission denied

But what does permission denied mean in this context? And how do I fix it?

I tried the solution for that post. Which said to add the user to the docker group. But that didn't work. I didn't see anything saying buildah needed the docker group anyhow.

iaquobe
  • 555
  • 1
  • 6
  • 23
  • 1
    were you able to resolve this issue? – Priyam Jul 08 '22 at 09:15
  • Same issue here, it started in an oraclelinux 7.9, probably after some system update. For now, I just identified it does not happen in docker `19.03` (`docker-engine`). So if a downgrade is an option it can solve it. Still looking for a solution in docker 20+ – ton Dec 05 '22 at 22:29

0 Answers0