This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
mystic/Makefile

19 lines
657 B
Makefile
Raw Permalink Normal View History

NAME=$$(head -1 Dockerfile|grep NAME |awk '{print $$3}')
VERSION=$$(grep VERSION Dockerfile |awk '{print $$3}')
REGISTRY=registry.leenooks.net
SUBDIRS := $(wildcard */.)
.PHONY: all build image $(SUBDIRS)
all: build
build: Dockerfile
@if test "$(NAME)" = ""; then echo "NAME not in Dockerfile."; exit 1; fi
@if test "$(VERSION)" = ""; then echo "VERSION not in Dockerfile."; exit 1; fi
@if test -f image.bz2; then rm -f image.bz2; fi
@#docker pull $(NAME):$(VERSION)
@#docker build --cache-from $(NAME):$(VERSION) -t $(NAME):$(VERSION) .
docker build -t $(NAME):$(VERSION) .
image: Dockerfile
docker save $(NAME):$(VERSION) | bzip2 -9 > image.bz2