Automated building/tagging/pushing of multiple Docker images in succession
Project description
Overview
This package provides a script which builds multiple Docker containers in sequence, using the contents of a docker_images.txt file in some directory. This file is tab-delimited, and lines starting with # are ignored.
Each non-comment line in docker_images.txt is of the format:
label path_to_Dockerfile
(with a tab character between the label and the Dockerfile path, not the spaces above). Docker images will be built in sequence, so images can refer to the results of previous images, e.g.:
image-base base/Dockerfile image-dev dev/Dockerfile
with dev/Dockerfile containing:
FROM image-base ...
The container build script checks for any uninitialized Git submodules, and by default refuses to build if any are found. This can be overridden if desired (see below).
Usage
The command-line entry point provided by this script is build_docker_containers. By default, images will be tagged with :latest appended to the base image name.
Options:
- --tag-timestamp
In addition to tagging images as latest, also tag with a timestamp in YYYYMMDD-HHmmss format. All images in docker_images.txt are tagged with the same timestamp.
- --push
Push all built containers to Docker Hub, both with latest tags and timestamp tags if --tag-timestamp is given.
- --ignore-missing-submodules
Allow building Docker containers if git submodule reports that at least one submodule is uninitialized.
- --pretend
Run in pretend mode: don’t actually execute anything (building, tagging, pushing).
Requirements
Python 3.6 or newer for this script. Docker to build/tag/push images (version unimportant).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file multi_docker_build-0.1-py3-none-any.whl
.
File metadata
- Download URL: multi_docker_build-0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 411e7ade8a230c52bbe8a7f04eb5f5949f18014e660ae614491b18d82f930e91 |
|
MD5 | d6d9715a134cc152f814f78b2576d519 |
|
BLAKE2b-256 | 5fbcb275bfe896f1a45722547ed14eecea971643c67e2564ac0f000f47e2a844 |