3rdparty/docker/bootstrap: Cleanup, little modernization

Change-Id: Icc16b3fca48ffe072aed06c495d93fc3c74deead
This commit is contained in:
Alexander von Gluck IV 2022-03-28 19:38:30 -05:00
parent 52f7c93894
commit 7bbfd0ff49
2 changed files with 9 additions and 8 deletions

View File

@ -1,4 +1,4 @@
FROM debian:bullseye-slim
FROM docker.io/debian:bullseye-slim
ENV DEBIAN_FRONTEND="noninteractive"

View File

@ -1,4 +1,5 @@
ENGINE=docker
VER=bullseye-slim-1
#ENGINE=podman
# Example mounting source code directory into container
@ -7,16 +8,16 @@ SOURCES=$(HOME)/Code
EXTRA=-v $(SOURCES)/haiku:/work/src/haiku -v $(SOURCES)/buildtools:/work/src/buildtools
default:
${ENGINE} build . --no-cache -t docker.io/haiku/bootstrap
${ENGINE} build . --no-cache -t docker.io/haiku/bootstrap:${VER}
clean:
${ENGINE} ps -q --filter=ancestor=docker.io/haiku/bootstrap | xargs -I {} ${ENGINE} kill {}
${ENGINE} ps -a -q --filter=ancestor=docker.io/haiku/bootstrap | xargs -I {} ${ENGINE} rm {}
${ENGINE} ps -q --filter=ancestor=docker.io/haiku/bootstrap:${VER} | xargs -I {} ${ENGINE} kill {}
${ENGINE} ps -a -q --filter=ancestor=docker.io/haiku/bootstrap:${VER} | xargs -I {} ${ENGINE} rm {}
${ENGINE} volume rm bootstrap_work
prep:
${ENGINE} run -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap prep
${ENGINE} run -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap:${VER} prep
crosstools:
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap crosstools
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap:${VER} crosstools
bootstrap:
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap bootstrap
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap:${VER} bootstrap
enter:
${ENGINE} run -it -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap /bin/bash -l
${ENGINE} run -it -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap:${VER} /bin/bash -l