2019-06-03 08:41:40 -05:00
|
|
|
ENGINE=docker
|
2022-03-28 19:38:30 -05:00
|
|
|
VER=bullseye-slim-1
|
2019-06-03 08:41:40 -05:00
|
|
|
#ENGINE=podman
|
|
|
|
|
|
|
|
# Example mounting source code directory into container
|
|
|
|
# (lets you "work on the code used to bootstrap" a bit easier)
|
2019-06-19 11:24:18 -05:00
|
|
|
SOURCES=$(HOME)/Code
|
2019-12-09 12:34:14 -06:00
|
|
|
EXTRA=-v $(SOURCES)/haiku:/work/src/haiku -v $(SOURCES)/buildtools:/work/src/buildtools
|
2019-06-03 08:41:40 -05:00
|
|
|
|
2018-11-02 15:03:48 -05:00
|
|
|
default:
|
2022-03-28 19:38:30 -05:00
|
|
|
${ENGINE} build . --no-cache -t docker.io/haiku/bootstrap:${VER}
|
2018-11-02 15:03:48 -05:00
|
|
|
clean:
|
2022-03-28 19:38:30 -05:00
|
|
|
${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 {}
|
2019-06-03 08:41:40 -05:00
|
|
|
${ENGINE} volume rm bootstrap_work
|
2019-12-09 12:34:14 -06:00
|
|
|
prep:
|
2022-03-28 19:38:30 -05:00
|
|
|
${ENGINE} run -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap:${VER} prep
|
2018-11-02 15:03:48 -05:00
|
|
|
crosstools:
|
2022-03-28 19:38:30 -05:00
|
|
|
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap:${VER} crosstools
|
2018-11-02 15:03:48 -05:00
|
|
|
bootstrap:
|
2022-03-28 19:38:30 -05:00
|
|
|
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap:${VER} bootstrap
|
2018-11-02 15:03:48 -05:00
|
|
|
enter:
|
2022-03-28 19:38:30 -05:00
|
|
|
${ENGINE} run -it -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap:${VER} /bin/bash -l
|