Code Monkey home page Code Monkey logo

dockerhub-build-trigger's Introduction

dockerhub-build-trigger

Build Status

This project aims to mirroring images from sources like gcr.io to dockerhub.

Basically, it periodically (relies on Travis CI cron job) checks versions from sources based on configurations in projects.txt, and creates tags if they don't exist yet. On dockerhub side, automatically pre-created repositories observe tag events and parse them to build new versions for images.

For immediate checking and building, you can also run scripts from local.

TOC

Why this repo

  • Access to gcr.io from China is blocked.
  • mirrorgooglecontainers and kubeimage in dockerhub haven't provided latest or all needed images.
  • gcr.azk8s.cn is no longer for public access (see here).
  • gcr.mirrors.ustc.edu.cn seems not working.
  • Mirror from aliyun requires login, inconvenient.
  • anjia0532/gcr.io_mirror is no longer maintained, and it relies on Travis CI's docker pulling and pushing, may overuse Travis CI's resources.
  • Luckily, dockerhub still can be accessed from China, and for more fast pulling speed, we can also use docker.mirrors.ustc.edu.cn etc. as a mirror of dockerhub.

No image or versions found

If you cannot find an image in dockerhub, please create an issue or PR to add new images or versions.

Run manually from local

Add a new image to be mirrored in projects.txt with the following format:

<name> <registry_type> <namespace>

Currently, only gcr registry type is supported.

Then, create repositories in dockerhub by running below command. You may need to export DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD before running the command. Otherwise, you may fail to create repositories.

$ make create_repositories

Finally, run below command to check new versions for images. When new versions are available, tags will be created and pushed to the remote, which will trigger dockerhub builds.

$ make check_new_versions

Mirror a specific version for an image

Before running the command, make sure corresponding project exists in projects.txt and repository is created in dockerhub.

$ ./scripts/create_tag.sh <name> <version>

Magic branches

  • version-checker

    Travis CI uses this branch to check new versions for images weekly. When this branch changes, an immediate build will also be triggered.

  • repo-creator

    If this branch changes, Travis CI will be triggered to check and create repositories in dockerhub.

License

MIT License

dockerhub-build-trigger's People

Contributors

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