Alexander von Gluck IV 0dbb417d43 3rdparty/docker/bootstrap: Fix defaults to be more generic and engine selection
Change-Id: I8a1e3c6bd641ea08a5a06985389269d708d94655
2019-07-01 14:07:03 -05:00

23 lines
1003 B
Makefile

ENGINE=docker
#ENGINE=podman
# Example mounting source code directory into container
# (lets you "work on the code used to bootstrap" a bit easier)
SOURCES=$(HOME)/Code
#EXTRA=-v $(SOURCES)/haiku:/work/src/haiku -v $(SOURCES)/buildtools:/work/src/buildtools
default:
${ENGINE} build . -t docker.io/haiku/bootstrap
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} volume rm bootstrap_work
init:
${ENGINE} run -v bootstrap_work:/work docker.io/haiku/bootstrap prep
crosstools:
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work ${EXTRA} docker.io/haiku/bootstrap crosstools
bootstrap:
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work ${EXTRA} docker.io/haiku/bootstrap bootstrap
enter:
${ENGINE} run -it -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work ${EXTRA} docker.io/haiku/bootstrap /bin/bash -l