Giter VIP home page Giter VIP logo

pubtools-quay's Introduction

pubtools-quay

Set of scripts used for operating with Quay service

Requirements

  • Python 2.6+
  • Python 3.5+
  • Skopeo is required for the tagging operation

Features

  • pubtools-quay-tag-image - Copy a quay image from source to destination(s)
  • pubtools-quay-merge-manifest-list - Merge manifest lists of new and old images. The architectures of new (source) image overwrite destination's archs. Archs missing from the source image will still remain in the merged manifest list. Destination image's manifest list is overwritten by the merged manifest list.
  • pubtools-quay-untag - Remove tags from quay repositories. Tags to remove are specified by image references. In addition to Docker credentials, Quay API OAuth token has to be specified. Script will not perform the untagging operation if some image in a repo will lose its last tag. In this scenario, untagging can be forced by using the --remove-last argument.

Setup

$ pip install -r requirements.txt
$ pip install .
or
$ python setup.py install

Usage

Locally copy an image from source to destination. Quay password is injected from the environment variable.

$ export QUAY_PASSWORD=token
$ pubtools-quay-tag-image \
  --source-ref quay.io/source/image:34 \
  --dest-ref quay.io/target/image:34 \
  --quay-user quay+username \

Connect to a remote host via ssh (using password) and perform the copying to multiple destinations.

$ export QUAY_PASSWORD=token
$ export SSH_PASSWORD=123456
$ pubtools-quay-tag-image \
  --source-ref quay.io/source/image:34 \
  --dest-ref quay.io/target/image:34 \
  --dest-ref quay.io/target/image2:34 \
  --quay-user quay+username \
  --remote-exec \
  --ssh-remote-host 127.0.0.1 \
  --ssh-remote-host-port 2222 \
  --ssh-username user

Connect to a remote host via ssh (using private key), perform the copying

$ export QUAY_PASSWORD=token
$ export SSH_PASSWORD=123456
$ pubtools-quay-tag-image \
  --source-ref quay.io/source/image:34 \
  --dest-ref quay.io/target/image:34 \
  --quay-user quay+username \
  --remote-exec \
  --ssh-remote-host 127.0.0.1 \
  --ssh-remote-host-port 2222 \
  --ssh-username user \
  --ssh-key-filename /path/to/file.key \

Merge manifest lists of source-ref and dest-ref and overwrite dest-ref with the result.

$ export QUAY_PASSWORD=token
$ pubtools-quay-merge-manifest-list \
  --source-ref quay.io/src/image:1 \
  --dest-ref quay.io/dest/image:1 \
  --quay-user quay+username

Untag multiple images

$ export QUAY_PASSWORD=token
$ export QUAY_API_TOKEN=oauth_token
$ pubtools-quay-tag-image \
  --reference quay.io/src/image:1 \
  --reference quay.io/src/image:2 \
  --quay-user quay+username \
  --remote-exec \
  --ssh-remote-host 127.0.0.1 \
  --ssh-remote-host-port 2222 \
  --ssh-username user \
  --ssh-key-filename /path/to/file.key \

Untag an image and force the operation in case the tag is a last reference of some digest.

$ export QUAY_PASSWORD=token
$ export QUAY_API_TOKEN=oauth_token
$ pubtools-quay-tag-image \
  --reference quay.io/src/image:1 \
  --remove-last \
  --quay-user quay+username \

pubtools-quay's People

Contributors

querti avatar emilyzheng avatar midnightercz avatar renovate-bot avatar rohanpm avatar

Watchers

James Cloos 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.