mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-02 18:51:40 +00:00
It is not necessary to bring up `eth0`, the program does it fine. This means we can remove shell script, clean up build. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
35 lines
912 B
Makefile
35 lines
912 B
Makefile
.PHONY: tag push clean container
|
|
default: push
|
|
|
|
IMAGE=dhcpcd
|
|
|
|
BASE=alpine:3.5
|
|
|
|
DEPS=dhcpcd.conf usr/lib/dhcpcd/dhcpcd-hooks/10-mtu
|
|
|
|
container: Dockerfile $(DEPS)
|
|
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
|
|
|
hash: Dockerfile $(DEPS)
|
|
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
|
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
|
docker run --rm $(IMAGE):build sh -c 'cat $^ /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
|
|
|
push: hash container
|
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
|
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
|
docker push mobylinux/$(IMAGE):$(shell cat hash))
|
|
docker rmi $(IMAGE):build
|
|
rm -f hash
|
|
|
|
tag: hash container
|
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
|
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash)
|
|
docker rmi $(IMAGE):build
|
|
rm -f hash
|
|
|
|
clean:
|
|
rm -rf hash
|
|
|
|
.DELETE_ON_ERROR:
|