forked from mjambon/ocaml-layer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
46 lines (39 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# Usage:
# - 'make' for building the Docker images specified by SELECTED_CONFIGS.
# - 'make push' for pushing these images to your registry e.g. Docker Hub.
#
ifndef SELECTED_CONFIGS
# The list of configuration files, one per image that you want to build
# when running 'make' and 'make push'.
SELECTED_CONFIGS = \
configs/alpine.sh \
configs/ubuntu.sh \
configs/alpine5.sh \
configs/ubuntu5.sh
endif
export SELECTED_CONFIGS
# Generate a Dockerfile for each config file and build a docker image.
.PHONY: build
build:
./docker-build $(SELECTED_CONFIGS)
# Push the docker images to Docker Hub or some other registry.
.PHONY: push
push:
./docker-push
# Tag docker images with the current architecture. (optional: needed for multi-arch images)
.PHONY: suffix-with-arch
suffix-with-arch:
./docker-suffix-with-arch
# Create and push a multi-arch docker image from multiple arch-specific images
.PHONY: push-multi-arch
push-multi-arch:
./docker-push-multi-arch
# Build and push.
.PHONY: all
all:
$(MAKE) build
$(MAKE) push
.PHONY: clean
clean:
git clean -dfX