跳转至

regctl

sync registry tool, support multi architecture container images

install

curl https://github.com/regclient/regclient/releases/download/v0.7.1/regctl-linux-amd64

cmd

  • login
    # login
    aws ecr get-login-password --region ${AWS_DEFAULT_REGION} |regctl registry login ${ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com --user AWS --pass-stdin
    
  • export

    regctl image export 123456789012.dkr.ecr.us-west-2.amazonaws.com/$REPO_PREFIX/$IMG_LAMBDA:latest /dev/null
    
    IMG_LAMBDA=x6u9o2u4/sample-connector-for-bedrock-lambda
    regctl image copy public.ecr.aws/${IMG_LAMBDA}:latest 123456789012.dkr.ecr.us-west-2.amazonaws.com/brconn/${IMG_LAMBDA}:latest
    

  • copy to private registry

    regctl image copy  nginx:latest 123456789012.dkr.ecr.us-west-2.amazonaws.com/nginx