docker-cloudflare-ddns/Makefile

42 lines
972 B
Makefile
Raw Normal View History

2019-03-05 19:16:45 +00:00
DOCKER_TAG ?= cloudflare-ddns-dev-${USER}
2019-03-09 00:44:47 +00:00
.PHONY: default
2019-03-05 19:16:45 +00:00
default: test
2019-03-09 00:44:47 +00:00
.PHONY:test
2019-03-05 19:16:45 +00:00
test:
@echo ok
2019-03-09 00:44:47 +00:00
.PHONY: update
2019-03-05 19:16:45 +00:00
update:
curl -o update_ddns.py https://raw.githubusercontent.com/cloudflare/python-cloudflare/master/examples/example_update_dynamic_dns.py
chmod +x update_ddns.py
2019-03-09 00:44:47 +00:00
.PHONY: build
build: build/qemu-x86_64-static
2019-03-05 19:16:45 +00:00
docker build . -t ${DOCKER_TAG}
2019-03-08 21:25:08 +00:00
build/qemu-arm-static:
2019-03-11 01:01:31 +00:00
./get_qemu.sh arm
2019-03-09 00:44:47 +00:00
build/qemu-x86_64-static:
2019-03-11 01:01:31 +00:00
./get_qemu.sh x86_64
2019-03-09 00:44:47 +00:00
build/qemu-aarch64-static:
2019-03-11 01:01:31 +00:00
./get_qemu.sh aarch64
2019-03-08 21:25:08 +00:00
2019-03-11 01:01:31 +00:00
.PHONY: cross-build-arm
cross-build-arm: build/qemu-arm-static
docker build --build-arg REPO=arm32v6 --build-arg ARCH=arm . -t ${DOCKER_TAG}-linux-arm
.PHONY: cross-build-arm
cross-build-arm64: build/qemu-aarch64-static
docker build --build-arg REPO=arm64v8 --build-arg ARCH=aarch64 . -t ${DOCKER_TAG}-linux-arm64
2019-03-08 21:25:08 +00:00
2019-03-09 00:44:47 +00:00
.PHONY: run
2019-03-05 19:16:45 +00:00
run: build
docker run --rm -e DOMAIN=${DOMAIN} \
-e CF_API_EMAIL=${CF_API_EMAIL} \
-e CF_API_KEY=${CF_API_KEY} \
${DOCKER_TAG}