GithubHelp home page GithubHelp logo

isabella232 / docker-builder-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wiredcraft/docker-builder

0.0 0.0 0.0 15 KB

Docker builder script - builds container hierarchy

License: MIT License

Makefile 0.11% Python 99.89%

docker-builder-1's Introduction

Docker Builder

Build script to create images which are based on each other in a certain hierarchy, tag them and push them to a remote repository.

The scenario is a stack of docker images where the 2nd one is made FROM: the 1st, the 3rd one is made FROM: the 2nd, ... and so on.

docker-builder helps to rebuild such a stack from the point where anything might have to changed and therefore a rebuild of an image (and naturally all images on top of that image in such a stack) is required. Let's say there is a stack of 10 images based on each other and i.e. a vulnaribility turns up in the 7th of those 10. The docker-builder helps to automatically rebuild the images 7-10

Test

sudo pip install -r requirements.txt
make test

Install

pip install docker-builder

Usage

docker-builder [-f <builder.yaml>] [--no-push] [--no-cache] [<container>...]

Config file

It expects a config file in yaml format in the current folder named builder.yaml.

Format

registries:
  - registry: https://index.docker.io/v1/
    username: user
    password: pass
    email: email

  - registry: local
    username: 127.0.0.1:5000

containers:
  - container1
  - container2
  - container3

Registries

Each of the containers will be tagged and pushed to each of the registries with the latest tag.

If registry is local, no login will be attempted and the container will be pushed to the local registry as defined in the username. If registry is an http/https based registry, the username, password and email will be used to login.

Containers

The containers attribute defines a list of containers and the order in which they will be built. It effectively defines the dependencies among containers and ensure the "source" ones are built first.

Each of the containers defined in the list must be defined in a matching name folder.

TODO

Lots of things; this first version is very crude and only a wrapper arround the regular docker CLI command.

  • use docker-py (why not...)
  • better management of hierarchy in a project (e.g. specifying a parent container would automatically re-build the childrens)
  • suggestions?

docker-builder-1's People

Contributors

dulhaver avatar kuno avatar zbal 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.