Repository navigation
Description
Description
I am able to pull an image from a private repository when I do lima nerdctl pull REPOSITORY\IMAGE. However, when I try to build with lima nerdctl compose up --build a Dockerfile that uses the same image from a private repository, I get an error.
Steps to reproduce the issue
- lima nerdctl login
- lima nerdctl compose up --build
Describe the results you received and expected
`=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.51kB 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 166B 0.1s
=> ERROR [internal] load metadata for docker.io/REPOSITORY/image:tag: 2.8s
[internal] load metadata for docker.io/REPOSITORY/image:tag:
Dockerfile:1
1 | >>> FROM REPOSITORY/image:tag
2 |
3 | # general environment settings
error: failed to solve: REPOSITORY/image:tag: pull access denied, repository does not exist or may require authorization: authorization status: 401: authorization failed
FATA[0003] unrecognized image format
FATA[0003] error while building image some_name: exit status 1 `
What version of nerdctl are you using?
Client:
Version: v0.17.1
Git commit: 20233c2
Server:
containerd:
Version: v1.6.1
GitCommit: 10f428dac7cec44c864e1b830a4623af27a9fc70
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
Lima
Host information
Client:
Namespace: default
Debug Mode: false
Server:
Server Version: v1.6.1
Storage Driver: overlayfs
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Log: json-file
Storage: native overlayfs fuse-overlayfs stargz
Security Options:
apparmor
seccomp
Profile: default
cgroupns
rootless
Kernel Version: 5.13.0-35-generic
Operating System: Ubuntu 21.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.827GiB
Name: lima-default
ID: 71cbe510-fc1b-4029-ac4a-c456e41560ff
WARNING: AppArmor profile "nerdctl-default" is not loaded.
Use 'sudo nerdctl apparmor load' if you prefer to use AppArmor with rootless mode.
This warning is negligible if you do not intend to use AppArmor.
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Activity
AkihiroSuda commentedon Mar 25, 2022
Cc @ktock
wonderfuwillard commentedon Mar 25, 2022
Same problem when using the local image as the base image in dockerfile
apostasie commentedon Jul 30, 2024
Cannot reproduce:
Running a registry on localhost using basic authentication.
compose.yaml:
Dockerfile.debug:
Confirming that buildkit does send authenticated requests to the registry (logs):
I also tried with a private repository on Docker Hub and it worked as well.
@wonderfuwillard @catalinbahrin : can you provide an example demonstrating how to reproduce this?
Also, can you provide the versions of buildctl and buildkit you are using, and how you did install and configure them?
apostasie commentedon Apr 20, 2025
@AkihiroSuda suggesting we close.