mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-14 20:50:31 +00:00
This way it runs as root so files always owned by root. Fix #887 This is the simplest fix for 1.13, we can also use this for creating the main system initrd, but that needs more changes so leaving for 1.14. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
32 lines
882 B
Makefile
32 lines
882 B
Makefile
.PHONY: tag push
|
|
|
|
BASE=alpine:3.4
|
|
IMAGE=tar2initrd
|
|
|
|
default: push
|
|
|
|
hash: Dockerfile tar2initrd.sh
|
|
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
|
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
|
docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c 'cat Dockerfile pad4.sh /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
|
|
|
push: hash
|
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
|
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
|
docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
|
|
docker push mobylinux/$(IMAGE):$(shell cat hash) && \
|
|
docker push mobylinux/$(IMAGE):latest)
|
|
docker rmi $(IMAGE):build
|
|
rm -f hash
|
|
|
|
tag: hash
|
|
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 -f hash
|
|
|
|
.DELETE_ON_ERROR:
|