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