-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
25 lines (22 loc) · 912 Bytes
/
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
default: build
DOCKER_BUILDX_ARGS ?=
DOCKER_IMAGE ?= mesaguy/alpine-rsync
ALPINE_VERSION ?= 3.11
DOCKER_PLATFORMS = linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x,linux/386
DOCKER_TARGET_REGISTRY ?=
BUILD_DATE = `date --utc +%Y%m%d`
build:
docker buildx build --pull --platform ${DOCKER_PLATFORMS} \
--build-arg ALPINE_VERSION=${ALPINE_VERSION} \
--build-arg SOURCE_COMMIT=`git rev-parse --short HEAD` \
--tag ${DOCKER_TARGET_REGISTRY}${DOCKER_IMAGE}:latest \
--tag ${DOCKER_TARGET_REGISTRY}${DOCKER_IMAGE}:${BUILD_DATE} \
${DOCKER_BUILDX_ARGS} .
push:
docker buildx build --pull --platform ${DOCKER_PLATFORMS} \
--build-arg ALPINE_VERSION=${ALPINE_VERSION} \
--build-arg SOURCE_COMMIT=`git rev-parse --short HEAD` \
--tag ${DOCKER_TARGET_REGISTRY}${DOCKER_IMAGE}:latest \
--tag ${DOCKER_TARGET_REGISTRY}${DOCKER_IMAGE}:${BUILD_DATE} \
--push \
${DOCKER_BUILDX_ARGS} .