-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
26 lines (20 loc) · 1.05 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
SHELL := /bin/sh
APPLICATION_NAME := technitium-dns-kube-controller
REPOSITORY := ghcr.io
USERNAME := aaronsteed
VERSION = $(shell poetry version -s)
multi-platform-builder:
docker buildx create --name mybuilder
docker buildx use mybuilder
build-multi-platform-image:
@echo 'Building $(REPOSITORY)/$(USERNAME)/$(APPLICATION_NAME):$(VERSION)'
docker buildx build --tag $(REPOSITORY)/$(USERNAME)/$(APPLICATION_NAME):$(VERSION) -o type=image --platform=linux/arm64,linux/amd64 .
native-build:
@echo 'Building $(REPOSITORY)/$(USERNAME)/$(APPLICATION_NAME):$(VERSION)'
docker buildx build --platform linux/amd64,linux/arm64 -t $(REPOSITORY)/$(USERNAME)/$(APPLICATION_NAME):$(VERSION) .
native-push: ##Push container to Github Container Registry 📍
@echo 'Pushing $(REPOSITORY)/$(USERNAME)/$(APPLICATION_NAME):$(VERSION)'
docker push '$(REPOSITORY)/$(USERNAME)/$(APPLICATION_NAME):$(VERSION)'
push-multi-platform-image:
docker login
docker buildx build --push --tag $(REPOSITORY)/$(USERNAME)/$(APPLICATION_NAME):$(VERSION) --platform=linux/arm64,linux/amd64 .