Skip to content
Snippets Groups Projects
Commit 52029b7c authored by Markus Frosch's avatar Markus Frosch
Browse files

git init

parents
No related branches found
No related tags found
No related merge requests found
# editors
*~
.*.sw[op]
# artifacts
*.tar*
.PHONY: all clean
all:
$(MAKE) -C stretch
clean:
$(MAKE) -C stretch clean
FROM scratch
ADD root.tar.xz /
CMD ["bash"]
# config this for image updates
DOWNLOAD_VERSION := 2018-06-29-03:25
DOWNLOAD_CHECKSUM := c79fa57cf66a9064addda899653178eb55cd3cc05c70c38cfa761692d742b3cc7410a057cb7010ace2116f149481f36f57513c1aca7a0d6f0fdf349e18c450e7
REPO := raspbian-base
DOWNLOAD_TARBALL := https://downloads.raspberrypi.org/raspbian_lite/archive/$(DOWNLOAD_VERSION)/root.tar.xz
DOWNLOAD_FILE := root.tar.xz
IMAGE_PREFIX := ${DOCKER_IMAGE_PREFIX}
ifeq ($(IMAGE_PREFIX),)
IMAGE_PREFIX := icinga/$(REPO)/
endif
REGISTRY := ${DOCKER_REGISTRY}
ifneq ($(REGISTRY),)
IMAGE_PREFIX := $(REGISTRY)/$(IMAGE_PREFIX)
endif
#ifeq ($(VERSION),)
#VERSION := $(shell basename `pwd`)
#endif
VERSION := stretch
IMAGE := $(IMAGE_PREFIX)$(VERSION)
.PHONY: all download clean
all: download build
download: $(DOWNLOAD_FILE)
$(DOWNLOAD_FILE):
@echo "Downloading $(DOWNLOAD_TARBALL)"
curl -LS -C - "$(DOWNLOAD_TARBALL)" -o "$@.tmp"
echo "$(DOWNLOAD_CHECKSUM) $@.tmp" | sha512sum -c
mv "$@.tmp" "$@"
build:
docker build --tag "$(IMAGE)" .
push:
docker push "$(IMAGE)"
clean:
rm -f *.tar*
if (docker inspect --type image "$(IMAGE)" >/dev/null 2>&1); then docker rmi "$(IMAGE)"; fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment