mdlavin / copy-docker-image Goto Github PK
View Code? Open in Web Editor NEWCopy a Docker image between registries without a full Docker installation
Copy a Docker image between registries without a full Docker installation
I can run aws commands from command line but getting following error for copy command.
C:\Users\Administrator\Downloads>copy-docker-image_windows_386.exe --srcURL https://hub.docker.com/r/full360/ --srcRepo sneaql --srcTag latest --destURL https://xxxxxxxx.dkr.ecr.us-east-1.amazonaws.com --destRepo vishalsneaql --destTag latest
2018/04/26 21:58:21 registry.ping url=https://hub.docker.com/r/full360/v2/
2018/04/26 21:58:22 registry.ping url=https://hub.docker.com/r/full360/v2/
2018/04/26 21:58:22 registry.ping url=https://xxxxx.dkr.ecr.us-east-1.amazonaws.com/v2/
Failed to establish a connection to the destination registry. Failed to create registry connection for https://xxxx.dkr.ecr.us-east-1.amazonaws.com. Get https://xxxxxx.dkr.ecr.us-east-1.amazonaws.com/v2/: http: non-successful response (status=401 body="Not Authorized\n")
When I try to copy Docker containers from one Amazon repository to another using the copy-docker-image utility on Windows, I receive the following errors:
This is the command I am using:
copy-docker-image_windows_amd64.exe --src-url ecr:123456789012 --src-repo src_repo --dest-url ecr:123456789012 --dest-repo dest_repo --tag="latest"
This is the output I am getting (Note: I have changed the values for privacy):
...
Need to upload layer sha256:3e17c6eae66cd23c59751c8d8f5eaf7044e0611dc5cebb12b1273be07cdac242 to the destination
2018/10/17 17:04:39 registry.layer.download url=https://123456789012.ecrrepo.amazonaws.com/v2/src_repo/blobs/sha256:3e17c6eae66cd23c59751c8d8f5eaf7044e0611dc5cebb12b1273be07cdac242 repository=src_repo digest=sha256:3e17c6eae66cd23c59751c8d8f5eaf7044e0611dc5cebb12b1273be07cdac242
2018/10/17 17:04:44 registry.layer.initiate-upload url=https://123456789012.ecrrepo.amazonaws.com/v2/dest_repo/blobs/uploads/ repository=dest_repo
2018/10/17 17:04:44 registry.layer.upload url=https://123456789012.ecrrepo.amazonaws.com/v2/dest_repo/blobs/uploads/20b341ec-299c-5a4e-24fc-e6b65943be07?digest=sha256%3A3e17c6eae66cd23c59751c8d8f5eaf7044e0611dc5cebb12b1273be07cdac242 repository=dest_repo digest=sha256:3e17c6eae66cd23c59751c8d8f5eaf7044e0611dc5cebb12b1273be07cdac242
Failed to remove image layer temp file C:\Users\joelr\AppData\Local\Temp\docker-image424633583. remove C:\Users\joelr\AppData\Local\Temp\docker-image424633583: The process cannot access the file because it is being used by another process.2018/10/17 17:04:57 registry.manifest.put url=https://123456789012.ecrrepo.amazonaws.com/v2/dest_repo/manifests/latest repository=dest_repo reference=latest
Failed to upload manifest to https://123456789012.ecrrepo.amazonaws.com/dest_repo:latest. Put https://123456789012.ecrrepo.amazonaws.com/v2/dest_repo/manifests/latest: http: non-successful response (status=405 body="{"errors":[{"code":"UNSUPPORTED","message":"Invalid parameter at 'ImageManifest' failed to satisfy constraint: 'Repository name in ImageManifest should match that in the request'"}]}\n")
Let me know how I can get around this problem.
I think you should rename srcRepo
/destRepo
to src-registry
/dest-registry
to be consistent with the Docker terminology and typical argument naming conventions.
For example, new command usage would be similar to:
copy-docker-image --src-registry http://registry1/ --dest-registry http://registry2 --repo project --tag v1
I'm trying to figure out how I would use this tool to copy an image between 2 different accounts that each require their own authentication. Any tips?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.