forked from ansible/ansible-docker-base
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
58 lines (49 loc) · 1.89 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
47
48
49
50
51
52
53
54
55
56
57
58
NS = corbanr
REPO = ansible
ANSIBLE_VERSION = 9.0
ANSIBLE_VERSION_MAX = 10.0
ALPINE_VERSION = 3
DEBIAN_VERSION = 12 # Bookwork
UBUNTU_VERSION = 24.04 # noble
default: all-build
alpine:
docker build --no-cache --pull --compress --rm \
--build-arg ALPINE_VERSION=$(ALPINE_VERSION) \
--build-arg LIBSSL=openssl-dev \
--build-arg ANSIBLE_VERSION=$(ANSIBLE_VERSION) \
--build-arg ANSIBLE_VERSION_MAX=$(ANSIBLE_VERSION_MAX) \
-f Dockerfile.alpine \
-t $(NS)/$(REPO):$(ANSIBLE_VERSION)-alpine$(ALPINE_VERSION) \
-t $(NS)/$(REPO):$(ANSIBLE_VERSION)-alpine \
-t $(NS)/$(REPO) .
debian:
docker build --no-cache --pull --compress --rm \
--build-arg DEBIAN_VERSION=$(DEBIAN_VERSION) \
--build-arg LIBSSL=libssl-dev \
--build-arg ANSIBLE_VERSION=$(ANSIBLE_VERSION) \
--build-arg ANSIBLE_VERSION_MAX=$(ANSIBLE_VERSION_MAX) \
-f Dockerfile.debian \
-t $(NS)/$(REPO):$(ANSIBLE_VERSION)-debian$(DEBIAN_VERSION) \
-t $(NS)/$(REPO):$(ANSIBLE_VERSION)-debian .
ubuntu:
docker build --no-cache --pull --compress --rm \
--build-arg UBUNTU_VERSION=$(UBUNTU_VERSION) \
--build-arg LIBSSL=libssl-dev \
--build-arg ANSIBLE_VERSION=$(ANSIBLE_VERSION) \
--build-arg ANSIBLE_VERSION_MAX=$(ANSIBLE_VERSION_MAX) \
-f Dockerfile.ubuntu \
-t $(NS)/$(REPO):$(ANSIBLE_VERSION)-ubuntu$(UBUNTU_VERSION) \
-t $(NS)/$(REPO):$(ANSIBLE_VERSION)-ubuntu .
alpine-push: alpine
docker push $(NS)/$(REPO):$(ANSIBLE_VERSION)-alpine$(ALPINE_VERSION)
docker push $(NS)/$(REPO):$(ANSIBLE_VERSION)-alpine
docker push $(NS)/$(REPO)
debian-push: debian
docker push $(NS)/$(REPO):$(ANSIBLE_VERSION)-debian$(DEBIAN_VERSION)
docker push $(NS)/$(REPO):$(ANSIBLE_VERSION)-debian
ubuntu-push: ubuntu
docker push $(NS)/$(REPO):$(ANSIBLE_VERSION)-ubuntu$(UBUNTU_VERSION)
docker push $(NS)/$(REPO):$(ANSIBLE_VERSION)-ubuntu
all-build: alpine debian ubuntu
all-push: alpine-push debian-push ubuntu-push
.PHONY : all-build all-push