Difference between revisions of "Docker push"
Jump to navigation
Jump to search
(→Errors) |
|||
(29 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
− | <code>[[docker push]]</code> push an image or a [[repository]] to a [[registry]] | + | <code>[[docker]] [[push]]</code> push/upload an image or a [[repository]] to a [[registry]] |
* https://docs.docker.com/engine/reference/commandline/push/ | * https://docs.docker.com/engine/reference/commandline/push/ | ||
+ | docker push [OPTIONS] NAME[:TAG] | ||
+ | [[docker push --help]] | ||
docker push my_image_name | docker push my_image_name | ||
− | docker push yourepo.company.com/my-image-name:0.1 | + | docker push yourepo.company.com/my-image-name:0.1 (use [[docker tag]] first) |
+ | |||
+ | docker push aws_account_id.dkr.[[ecr.us-west-2.amazonaws.com]]/[[my-repository]]:tag | ||
+ | |||
+ | docker push aws_account_id.dkr.[[ecr.us-west-2.amazonaws.com]]/[[my-repository]] | ||
+ | Using default tag: latest | ||
+ | The push refers to repository [aws_account_id.dkr.ecr.us-west-2.amazonaws.com/my-repository] | ||
+ | [[An image does not exist locally with the tag]]: aws_account_id.dkr.ecr.us-west-2.amazonaws.com/my-repository | ||
+ | |||
+ | Solution: [[docker tag]] | ||
+ | |||
docker push [[--quiet]] your_image | docker push [[--quiet]] your_image | ||
− | + | ||
== Errors == | == Errors == | ||
+ | docker push yourepo.company.com/my-image-name:0.1 | ||
+ | The push refers to repository [0987654321.dkr.ecr.eu-west-1.amazonaws.com/yourimage] | ||
+ | 6e4707a7ffef: Preparing | ||
+ | b284af3bfffe: Preparing | ||
+ | [[denied: Your authorization token has expired. Reauthenticate and try again.]] | ||
+ | |||
+ | |||
docker push your-image yourepo.company.com/my-image-name:0.1 | docker push your-image yourepo.company.com/my-image-name:0.1 | ||
Line 19: | Line 38: | ||
Push an image or a repository to a registry | Push an image or a repository to a registry | ||
+ | |||
+ | Solution: use [[docker tag]] first to tag remote repository | ||
− | + | ||
+ | [[no basic auth credentials]] | ||
== Examples == | == Examples == | ||
+ | docker push 123456789.dkr.ecr.eu-west-1.amazonaws.com/test:test | ||
+ | The push refers to repository [123456789.dkr.ecr.eu-west-1.amazonaws.com/test] | ||
+ | f14ff08d5dd8: Layer already exists | ||
+ | e8021939f780: Layer already exists | ||
+ | 62b91c8f98ba: Layer already exists | ||
+ | 831752bc44cf: Layer already exists | ||
+ | 9cd7ab30bc7a: Layer already exists | ||
+ | 53f34d42171e: Layer already exists | ||
+ | 5f70bf18a086: Layer already exists | ||
+ | 78584bfdde14: Layer already exists | ||
+ | 7c3614922921: Layer already exists | ||
+ | ed97e53597b7: Layer already exists | ||
+ | 11ee7ee7b4ec: Layer already exists | ||
+ | a87ed74e4271: Layer already exists | ||
+ | c0a7e64cd447: Layer already exists | ||
+ | f1417ff83b31: Layer already exists | ||
+ | test: digest: sha256:f84f07adfsafsafasfaf7b3fbt size: 3255 | ||
+ | |||
+ | == Errors == | ||
docker push "your_ecr_repo/elasticsearch:v9.9" | docker push "your_ecr_repo/elasticsearch:v9.9" | ||
The push refers to repository [xxxxxxxx.dkr.ecr.eu-central-1.amazonaws.com/repo/name] | The push refers to repository [xxxxxxxx.dkr.ecr.eu-central-1.amazonaws.com/repo/name] | ||
Line 39: | Line 80: | ||
denied: [[Your authorization token has expired]]. [[Reauthenticate]] and try again. | denied: [[Your authorization token has expired]]. [[Reauthenticate]] and try again. | ||
− | Solution: <code>[[docker login]]</code> | + | Solution: <code>[[docker login]]</code> or <code>[[aws ecr get-login-password]]</code> |
+ | |||
+ | == Example automation == | ||
== Related terms == | == Related terms == | ||
+ | * <code>[[docker image push]]</code> | ||
+ | * <code>[[docker image ls]]</code> | ||
* <code>[[docker pull]]</code> | * <code>[[docker pull]]</code> | ||
+ | * <code>[[aws ecr describe-repositories]]</code> | ||
* [[Binary repository manager]] | * [[Binary repository manager]] | ||
* <code>[[conan upload]]</code> | * <code>[[conan upload]]</code> | ||
* <code>[[docker container commit]]</code> | * <code>[[docker container commit]]</code> | ||
* <code>[[docker logs]]</code> | * <code>[[docker logs]]</code> | ||
− | * <code>[[aws | + | * <code>[[aws ecr put-image]]</code> |
* <code>[[aws ecr list-images]]</code> | * <code>[[aws ecr list-images]]</code> | ||
− | |||
* <code>[[docker tag]]</code> | * <code>[[docker tag]]</code> | ||
+ | * <code>aws ecr get-login-password --region YOUR_REGIOM | docker login --username YOUR_USERNAME --password-stdin YOUR_ACCOUNT_ID.dkr.ecr.YOUR_REGION.amazonaws.com</code> | ||
+ | * <code>[[earthly --push]]</code> | ||
== See also == | == See also == | ||
* {{docker push}} | * {{docker push}} | ||
− | * {{ | + | * {{docker tag}} |
+ | * {{aws ecr}} | ||
+ | * {{Registry}} | ||
[[Category:Docker]] | [[Category:Docker]] |
Latest revision as of 07:30, 27 August 2024
docker push
push/upload an image or a repository to a registry
docker push [OPTIONS] NAME[:TAG] docker push --help
docker push my_image_name docker push yourepo.company.com/my-image-name:0.1 (use docker tag first)
docker push aws_account_id.dkr.ecr.us-west-2.amazonaws.com/my-repository:tag
docker push aws_account_id.dkr.ecr.us-west-2.amazonaws.com/my-repository Using default tag: latest The push refers to repository [aws_account_id.dkr.ecr.us-west-2.amazonaws.com/my-repository] An image does not exist locally with the tag: aws_account_id.dkr.ecr.us-west-2.amazonaws.com/my-repository Solution: docker tag
docker push --quiet your_image
Errors[edit]
docker push yourepo.company.com/my-image-name:0.1 The push refers to repository [0987654321.dkr.ecr.eu-west-1.amazonaws.com/yourimage] 6e4707a7ffef: Preparing b284af3bfffe: Preparing denied: Your authorization token has expired. Reauthenticate and try again.
docker push your-image yourepo.company.com/my-image-name:0.1 "docker push" requires exactly 1 argument. See 'docker push --help'. Usage: docker push [OPTIONS] NAME[:TAG] Push an image or a repository to a registry Solution: use docker tag first to tag remote repository
no basic auth credentials
Examples[edit]
docker push 123456789.dkr.ecr.eu-west-1.amazonaws.com/test:test The push refers to repository [123456789.dkr.ecr.eu-west-1.amazonaws.com/test] f14ff08d5dd8: Layer already exists e8021939f780: Layer already exists 62b91c8f98ba: Layer already exists 831752bc44cf: Layer already exists 9cd7ab30bc7a: Layer already exists 53f34d42171e: Layer already exists 5f70bf18a086: Layer already exists 78584bfdde14: Layer already exists 7c3614922921: Layer already exists ed97e53597b7: Layer already exists 11ee7ee7b4ec: Layer already exists a87ed74e4271: Layer already exists c0a7e64cd447: Layer already exists f1417ff83b31: Layer already exists test: digest: sha256:f84f07adfsafsafasfaf7b3fbt size: 3255
Errors[edit]
docker push "your_ecr_repo/elasticsearch:v9.9" The push refers to repository [xxxxxxxx.dkr.ecr.eu-central-1.amazonaws.com/repo/name] 40a381ca46dc: Preparing f9cd3098ca32: Preparing c3e87cd6748e: Preparing 3995c6207484: Preparing 9cbb1bc9540c: Preparing 2dca0f18577a: Waiting e77d17b4c748: Waiting 5fde16b8f2a5: Waiting bb800dda9d0e: Waiting f92203fcb38b: Waiting e9fb19c67236: Waiting 0a367bc63a2a: Waiting denied: Your authorization token has expired. Reauthenticate and try again.
Solution:docker login
oraws ecr get-login-password
Example automation[edit]
Related terms[edit]
docker image push
docker image ls
docker pull
aws ecr describe-repositories
- Binary repository manager
conan upload
docker container commit
docker logs
aws ecr put-image
aws ecr list-images
docker tag
aws ecr get-login-password --region YOUR_REGIOM | docker login --username YOUR_USERNAME --password-stdin YOUR_ACCOUNT_ID.dkr.ecr.YOUR_REGION.amazonaws.com
earthly --push
See also[edit]
docker push: [ --quiet | --help ]
docker tag
- ECR:
aws ecr
[get-login | get-login-password | describe-repositories | list-images | describe-images | create-repository | start-image-scan | describe-image-scan-findings | batch-get-image | put-image ]
- Registry, Container registry, infrastructure registry, OCI registry, Docker Hub
Advertising: