Skip to content

Cannot pull image from private repository after successful login #920

@catalinbahrin

Description

@catalinbahrin

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

  1. lima nerdctl login
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/loginauthentification/ loginbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions