2019-03-05 19:16:45 +00:00
|
|
|
DOCKER_TAG ?= cloudflare-ddns-dev-${USER}
|
2020-01-22 01:44:02 +00:00
|
|
|
.PHONY: clean
|
2019-03-07 21:49:06 +00:00
|
|
|
|
|
|
|
.PHONY: default
|
2019-03-05 19:16:45 +00:00
|
|
|
default: test
|
|
|
|
|
2019-03-07 21:49:06 +00:00
|
|
|
.PHONY:test
|
2019-03-05 19:16:45 +00:00
|
|
|
test:
|
|
|
|
@echo ok
|
|
|
|
|
2019-03-07 21:49:06 +00:00
|
|
|
.PHONY: build
|
2020-01-22 01:44:02 +00:00
|
|
|
build:
|
2019-03-05 19:16:45 +00:00
|
|
|
docker build . -t ${DOCKER_TAG}
|
|
|
|
|
2019-03-07 21:49:06 +00:00
|
|
|
.PHONY: cross-build-arm
|
2020-01-22 01:44:02 +00:00
|
|
|
cross-build-arm:
|
2020-01-30 19:09:56 +00:00
|
|
|
docker build --build-arg REPO=arm32v7 --build-arg ARCH=arm . -t ${DOCKER_TAG}-linux-arm
|
2019-03-07 21:49:06 +00:00
|
|
|
|
2020-01-10 21:38:09 +00:00
|
|
|
.PHONY: cross-build-arm64
|
2020-01-22 01:44:02 +00:00
|
|
|
cross-build-arm64:
|
2019-03-07 21:49:06 +00:00
|
|
|
docker build --build-arg REPO=arm64v8 --build-arg ARCH=aarch64 . -t ${DOCKER_TAG}-linux-arm64
|
|
|
|
|
2020-01-22 01:44:02 +00:00
|
|
|
.PHONY: all
|
|
|
|
all: build cross-build-arm cross-build-arm64
|
|
|
|
|
2019-03-07 21:49:06 +00:00
|
|
|
.PHONY: run
|
2019-03-05 19:16:45 +00:00
|
|
|
run: build
|
2020-01-22 01:44:02 +00:00
|
|
|
docker run --rm \
|
2019-03-05 19:16:45 +00:00
|
|
|
-e CF_API_EMAIL=${CF_API_EMAIL} \
|
|
|
|
-e CF_API_KEY=${CF_API_KEY} \
|
2020-01-22 01:44:02 +00:00
|
|
|
${DOCKER_TAG} \
|
|
|
|
"${DOMAIN}"
|