mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 02:21:34 +00:00
Add some missing --rm in docker run
Some of these were missing, leaving strays around. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
66ac858d2f
commit
f190512e2e
@ -44,7 +44,7 @@ moby-initrd.img: Dockerfile mkinitrd.sh init $(ETCFILES)
|
|||||||
| \
|
| \
|
||||||
docker build -q - ) && [ -n "$$BUILD" ] && echo "Built $$BUILD" && \
|
docker build -q - ) && [ -n "$$BUILD" ] && echo "Built $$BUILD" && \
|
||||||
echo $$BUILD > mobylinux.tag && \
|
echo $$BUILD > mobylinux.tag && \
|
||||||
docker run --read-only --net=none --log-driver=none --rm --tmpfs /tmp --tmpfs /initrd $$BUILD > $@
|
docker run --rm --read-only --net=none --log-driver=none --tmpfs /tmp --tmpfs /initrd $$BUILD > $@
|
||||||
|
|
||||||
container-initrd.img:
|
container-initrd.img:
|
||||||
(find containers -type d -maxdepth 1 && \
|
(find containers -type d -maxdepth 1 && \
|
||||||
@ -63,12 +63,12 @@ initrd.img: moby-initrd.img container-initrd.img
|
|||||||
|
|
||||||
mobylinux-efi.iso: Dockerfile.efi initrd.img kernel/x86_64/vmlinuz64
|
mobylinux-efi.iso: Dockerfile.efi initrd.img kernel/x86_64/vmlinuz64
|
||||||
BUILD=$$( tar cf - $^ | docker build -q -f Dockerfile.efi - ) && [ -n "$$BUILD" ] && echo "Built $$BUILD" && \
|
BUILD=$$( tar cf - $^ | docker build -q -f Dockerfile.efi - ) && [ -n "$$BUILD" ] && echo "Built $$BUILD" && \
|
||||||
docker run --net=none --log-driver=none --rm --cap-add sys_admin $$BUILD cat /tmp/efi/mobylinux.efi > mobylinux.efi && \
|
docker run --rm --net=none --log-driver=none --cap-add sys_admin $$BUILD cat /tmp/efi/mobylinux.efi > mobylinux.efi && \
|
||||||
docker run --net=none --log-driver=none --rm --cap-add sys_admin $$BUILD cat /tmp/efi/mobylinux-efi.iso > $@
|
docker run --rm --net=none --log-driver=none --cap-add sys_admin $$BUILD cat /tmp/efi/mobylinux-efi.iso > $@
|
||||||
|
|
||||||
mobylinux-bios.iso: initrd.img kernel/x86_64/vmlinuz64
|
mobylinux-bios.iso: initrd.img kernel/x86_64/vmlinuz64
|
||||||
tar cf - initrd.img -C kernel/x86_64 vmlinuz64 | \
|
tar cf - initrd.img -C kernel/x86_64 vmlinuz64 | \
|
||||||
docker run --net=none --log-driver=none --rm -i mobylinux/alpine-bios@sha256:$(ALPINE_BIOS_DIGEST) >$@
|
docker run --rm --net=none --log-driver=none -i mobylinux/alpine-bios@sha256:$(ALPINE_BIOS_DIGEST) >$@
|
||||||
|
|
||||||
common: initrd.img
|
common: initrd.img
|
||||||
$(MAKE) -C kernel
|
$(MAKE) -C kernel
|
||||||
|
@ -14,7 +14,7 @@ push: hash
|
|||||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||||
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
||||||
docker push mobylinux/$(IMAGE):$(shell cat hash))
|
docker push mobylinux/$(IMAGE):$(shell cat hash))
|
||||||
docker run $(IMAGE):build cat /lib/apk/db/installed | grep -E '^(P|V)' | \
|
docker run --rm $(IMAGE):build cat /lib/apk/db/installed | grep -E '^(P|V)' | \
|
||||||
awk '/^P/{printf substr($$1, 3),$$0;next} /^V/{print " " substr($$1, 3);next}' | sort > packages
|
awk '/^P/{printf substr($$1, 3),$$0;next} /^V/{print " " substr($$1, 3);next}' | sort > packages
|
||||||
docker rmi -f $(IMAGE):build
|
docker rmi -f $(IMAGE):build
|
||||||
rm -f hash
|
rm -f hash
|
||||||
|
@ -8,7 +8,7 @@ default: push
|
|||||||
hash:
|
hash:
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
||||||
tar cf - Dockerfile | docker build --no-cache -t $(IMAGE):build -
|
tar cf - Dockerfile | docker build --no-cache -t $(IMAGE):build -
|
||||||
docker run $(IMAGE):build sh -c 'cat /usr/local/go/bin/go /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
docker run --rm $(IMAGE):build sh -c 'cat /usr/local/go/bin/go /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
||||||
|
|
||||||
push: hash
|
push: hash
|
||||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||||
|
@ -6,7 +6,7 @@ default: push
|
|||||||
|
|
||||||
hash: Dockerfile build.sh
|
hash: Dockerfile build.sh
|
||||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
||||||
docker run --entrypoint sh $(IMAGE):build -c 'cat /Dockerfile /build.sh /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
docker run --rm --entrypoint sh $(IMAGE):build -c 'cat /Dockerfile /build.sh /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
||||||
|
|
||||||
push: hash
|
push: hash
|
||||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||||
|
@ -8,7 +8,7 @@ default: push
|
|||||||
hash:
|
hash:
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
||||||
tar cf - Dockerfile | docker build --no-cache -t $(IMAGE):build -
|
tar cf - Dockerfile | docker build --no-cache -t $(IMAGE):build -
|
||||||
docker run --entrypoint=/bin/sh $(IMAGE):build -c 'cat /usr/bin/check-config.sh /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c 'cat /usr/bin/check-config.sh /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
||||||
|
|
||||||
push: hash
|
push: hash
|
||||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||||
|
@ -6,7 +6,7 @@ default: push
|
|||||||
|
|
||||||
hash: Dockerfile
|
hash: Dockerfile
|
||||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
||||||
docker run --entrypoint sh $(IMAGE):build -c 'cat /Dockerfile /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
docker run --rm --entrypoint sh $(IMAGE):build -c 'cat /Dockerfile /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
||||||
|
|
||||||
push: hash
|
push: hash
|
||||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||||
|
@ -6,7 +6,7 @@ default: push
|
|||||||
|
|
||||||
hash: Dockerfile
|
hash: Dockerfile
|
||||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
||||||
docker run --entrypoint sh $(IMAGE):build -c 'cat /Dockerfile /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
docker run --rm --entrypoint sh $(IMAGE):build -c 'cat /Dockerfile /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
||||||
|
|
||||||
push: hash
|
push: hash
|
||||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||||
|
@ -7,9 +7,9 @@ IMAGE=toybox-media
|
|||||||
default: push
|
default: push
|
||||||
|
|
||||||
hash:
|
hash:
|
||||||
docker run $(BASE) ls tar sh find sha1sum | \
|
docker run --rm $(BASE) ls tar sh find sha1sum | \
|
||||||
docker build -q -t $(IMAGE):build -
|
docker build -q -t $(IMAGE):build -
|
||||||
docker run $(IMAGE):build tar cf - bin | docker run -i $(IMAGE):build sha1sum -b - > hash
|
docker run --rm $(IMAGE):build tar cf - bin | docker run -i $(IMAGE):build sha1sum -b - > hash
|
||||||
|
|
||||||
push: hash
|
push: hash
|
||||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||||
|
@ -22,4 +22,4 @@ else
|
|||||||
cp alpine/kernel/x86_64/vmlinuz64 "$mobydir"/vmlinuz64
|
cp alpine/kernel/x86_64/vmlinuz64 "$mobydir"/vmlinuz64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker run --privileged --pid=host justincormack/nsenter1 /sbin/reboot
|
docker run --rm --privileged --pid=host justincormack/nsenter1 /sbin/reboot
|
||||||
|
Loading…
Reference in New Issue
Block a user