Giter Club home page Giter Club logo

ecr-copy-go's Introduction

ecr-copy

CLI utility that copies AWS ECR images between repositories in the same account and region, without using docker at all.

The copy is done using low-level ECR API calls which are described in the documentation as being used by the Amazon ECR proxy and not generally by customers.

Note: For a more featured tool that uses docker APIs (but not a running docker daemon), checkout crane from Google.

Note that for any image layers which need to be copied, the layer's content is downloaded (into memory) and re-uploaded, so a copy is likely to work faster and cheaper from an EC2 instance, Lambda, CloudShell, etc.

There's no published way to clean-up partial uploads in the event of subsequent error. I can't find any documentation about what happens to partially uploaded layers, or layers which are not part of any image. I hope they are cleaned up in the background, but consider the possibility they are invisibly present forever (or until repository is deleted?) and charged for.

This utility assumes that things are how I found them to be in my particular use case. #YMMV

You'll need AWS credentials โ€” provided in the usual ways โ€” which allow read from the source repo and write to the destination.

Installation

go install hellopiers.io/ecr-copy@latest

Usage

ecr-copy fromRepoName tagOrDigest toRepoName [new-tag]

If the argument for tagOrDigest is of the form xxxx:hex then it's treated as a digest, otherwise as a tag.

The output is on the verbose side.

ecr-copy-go's People

Contributors

hellopiers avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.