nerdctl icon indicating copy to clipboard operation
nerdctl copied to clipboard

Support `push --all-tags` to push all tags

Open anitakrueger opened this issue 1 year ago • 4 comments

Description

The push command despite making the tag optional, does not push all tagged local images like docker push does (https://docs.docker.com/reference/cli/docker/image/push/#all-tags). I see this is documented in the command reference, but is there a reason?

In addition, we need to push tags and the image needs an soci index. At the moment, I have to run 2 nerdctl push commands and the second one will overwrite the firsts soci index.

Steps to reproduce the issue

  1. run nerdctl tag twice and then push without a tag
nerdctl tag ${{ steps.login-ecr-pull.outputs.registry }}/${{ inputs.pull_repo }}:${{ inputs.image_tag }} ${{ steps.login-ecr-push.outputs.registry }}/${{ inputs.push_repo }}:${{ inputs.image_tag }}
nerdctl tag ${{ steps.login-ecr-pull.outputs.registry }}/${{ inputs.pull_repo }}:${{ inputs.image_tag }} ${{ steps.login-ecr-push.outputs.registry }}/${{ inputs.push_repo }}:latest
nerdctl push --soci-min-layer-size ${{ inputs.soci-min-layer-size }} --snapshotter soci ${{ steps.login-ecr-push.outputs.registry }}/${{ inputs.push_repo }}
  1. Only the latest tag will show up in the registry.

Describe the results you received and expected

Only the latest tag is pushed, the other tag is not.

What version of nerdctl are you using?

Client:
 Version:       v2.0.1
 OS/Arch:       linux/arm64
 Git commit:    47f31ff2c1615c1accb85c1ce4e7882ad739102f
 buildctl:
  Version:      v0.18.0
  GitCommit:    95d190ef4f18b57c717eaad703b67cb2be781ebb

Server:
 containerd:
  Version:      v2.0.0
  GitCommit:    207ad711eabd375a01713109a8a197d197ff6542
 runc:
  Version:      1.2.2
  GitCommit:    v1.2.2-0-g7cb36325

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

Client:
 Namespace:     default
 Debug Mode:    false

Server:
 Server Version: v2.0.0
 Storage Driver: overlayfs
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Log:     fluentd journald json-file none syslog
  Storage: native overlayfs
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
  rootless
 Kernel Version:   6.8.0-1019-aws
 Operating System: Ubuntu 22.04.5 LTS
 OSType:           linux
 Architecture:     aarch64
 CPUs:             2
 Total Memory:     3.742GiB
 Name:             ip-192-168-2-200
 ID:               cd73469d-00ea-46d9-ad10-a77473f04972

WARNING: No cpu cfs period support
WARNING: No cpu cfs quota support
WARNING: No cpu shares support
WARNING: No cpuset support
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

anitakrueger avatar Dec 11 '24 12:12 anitakrueger

ref to https://github.com/moby/moby/issues/48760

yankay avatar Dec 17 '24 06:12 yankay

Hi! Me (@yashkukrecha), @ShivanshNikhra, and @aravsrid are a group of three students working on open-source issues for our virtualization course. We’re interested in taking on this issue and coordinating the work among ourselves to submit a single PR.

We estimate we can complete it within the next month. Would it be okay if we proceed with this issue? If you prefer assignments, we’re happy to be assigned as well. Thanks!

yashkukrecha avatar Nov 11 '25 20:11 yashkukrecha

Hi @AkihiroSuda, can you review the PR I submitted for this issue whenever possible? Thanks!

yashkukrecha avatar Dec 03 '25 05:12 yashkukrecha

CI seems failing

AkihiroSuda avatar Dec 03 '25 06:12 AkihiroSuda