mirror of
https://gitlab.com/alemaire/buildx.git
synced 2025-01-10 10:43:28 +00:00
21 lines
686 B
Makefile
21 lines
686 B
Makefile
NAMESPACE=alemairebe
|
|
include version
|
|
|
|
IMAGE=unifi
|
|
|
|
nopush:
|
|
docker buildx build --platform linux/amd64 --load \
|
|
--build-arg VERSION=$(VERSION) \
|
|
--build-arg UNIFI_VERSION=$(UNIFI_VERSION) \
|
|
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
|
|
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
|
|
|
|
push:
|
|
docker buildx build --platform linux/amd64,linux/arm64 --push \
|
|
--build-arg VERSION=$(VERSION) \
|
|
--build-arg UNIFI_VERSION=$(UNIFI_VERSION) \
|
|
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
|
|
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
|
|
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
|
|
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
|