Giter Site home page Giter Site logo

pull_docker_image's Introduction

Overview

This commandline utility allows you to pull docker images from a GitLab registry by providing a GitLab username and GitLab access token

Versioning

We are following v<major>.<minor>.<patch> versioning convention, where:

  • <major>+1 means we changed the infrastructure and/or the major components that makes this software run. Will definitely lead to breaking changes.
  • <minor>+1 means we upgraded/patched the dependencies this software relays on. Can lead to breaking changes.
  • <patch>+1 means we fixed a bug and/or added a feature. Breaking changes are not expected.

๐Ÿ”จ Pre-requisite

The utility attempts to read two environment variables: GIT_USERNAME and GIT_TOKEN. These values can be passed to the script via command line arguments though.

How to

First install the requirements:

pip install -r requirements.txt

Use ./pull_docker_image -h to view the help contents:

./'pull_docker_image.py' -h
usage: pull_docker_image.py [-h] [-p TOKEN] [-t TAG] [-u USERNAME] registry

Pull a docker image from the GitLab registry.

positional arguments:
  registry              The registry to pull a docker image from

optional arguments:
  -h, --help            show this help message and exit
  -p TOKEN, --token TOKEN
                        A GitLab token with registry read privileges. Will attempt to retrieve this from the environment variable GIT_TOKEN.
  -t TAG, --tag TAG
  -u USERNAME, --username USERNAME
                        GitLab username. Will attempt to retrieve this fromthe environment variable GIT_USERNAME.

Example usage:

./pull_docker_image.py registry.gitlab.com/ghrc-cloud/ghrc-tf-deploy
Pulling latest image from registry.gitlab.com/ghrc-cloud/ghrc-tf-deploy...

pull_docker_image's People

Contributors

michaellh0079 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.