Skip to content

Commit

Permalink
Docker build tool renamed to docker_make
Browse files Browse the repository at this point in the history
The build tool behaves more like make, it builds only the changed images.
  • Loading branch information
Bernhard Ehlers committed Dec 15, 2023
1 parent 4a87537 commit 67c7b12
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/bin/docker_build → .github/bin/docker_make
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""
docker_build - (re)build outdated docker images
docker_make - (re)build outdated docker images
usage: docker_build [--help] [--all] [--dir DIR] [--dry-run] [--file FILE]
[image ...]
usage: docker_make [--help] [--all] [--dir DIR] [--dry-run] [--file FILE]
[image ...]
positional arguments:
image images to build additionally
Expand Down
12 changes: 6 additions & 6 deletions .github/docker_build.md → .github/docker_make.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ files, that got an update. Then a manual trigger is needed.

## Build Tool

The `docker_build` tool reads a configuration file and
The `docker_make` tool reads a configuration file and
then starts building images with `docker buildx build`.

If `docker_build` is launched without arguments, it checks
If `docker_make` is launched without arguments, it checks
all configured images for an update of the base image.
Additionally it checks, if `git` shows an update of
the directory containing the docker build context.
When at least one of these conditions is met, the tool
starts a rebuild of that image.

When `docker_build` is run with some image names as
When `docker_make` is run with some image names as
arguments, then these images are additionally built.
When using a base image name as an argument, then all
images with that base image are rebuilt.
Expand Down Expand Up @@ -72,7 +72,7 @@ The target image may contain the full name, in which
case it will contain one or more '/' characters.

Another option is to specify only the last part of the
image name. Then `docker_build` uses the `DOCKER_REPOSITORY`
image name. Then `docker_make` uses the `DOCKER_REPOSITORY`
environment variable as its initial part. For example, an
DOCKER_REPOSITORY value of "ghcr.io/b-ehlers" plus the image
name of "alpine-1" results in "ghcr.io/b-ehlers/alpine-1".
Expand Down Expand Up @@ -118,7 +118,7 @@ DOCKER_LOGIN_GH="ghcr.io github-user github-password"
uses YAML files in the .github/workflows directory
to define, which tasks should be run.

Before `docker_build` can be run the following steps
Before `docker_make` can be run the following steps
need to be done:

* Check out the repository code
Expand All @@ -127,7 +127,7 @@ need to be done:
* Login to the Container Registries
* Install python requirements

Then `docker_build` can be executed,
Then `docker_make` can be executed,
normally without any arguments.

But what, when an image build needs to be forced?
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ jobs:
fi
# use option --dir to use a subdirectory as a docker base dir
python3 "$GITHUB_WORKSPACE/.github/bin/docker_build" --dir "docker" "$@"
python3 "$GITHUB_WORKSPACE/.github/bin/docker_make" --dir "docker" "$@"

0 comments on commit 67c7b12

Please sign in to comment.