[haiku-commits] haiku: hrev53178 - 3rdparty/docker/bootstrap

  • From: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 3 Jun 2019 09:42:18 -0400 (EDT)

hrev53178 adds 1 changeset to branch 'master'
old head: 31c38ae2b1b860b8b76ab93027be8dbf79b50d2f
new head: 6018afcd9d9c974bd7fbe3d5f09d752e1897d22a
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=6018afcd9d9c+%5E31c38ae2b1b8

----------------------------------------------------------------------------

6018afcd9d9c: docker/bootstrap: A few tweaks to your life easier
  
  Change-Id: I591e108f9a5007423a5dee541e94b2be2342c5a8

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53178
Commit:      6018afcd9d9c974bd7fbe3d5f09d752e1897d22a
URL:         https://git.haiku-os.org/haiku/commit/?id=6018afcd9d9c
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Mon Jun  3 13:41:40 2019 UTC

----------------------------------------------------------------------------

1 file changed, 15 insertions(+), 8 deletions(-)
3rdparty/docker/bootstrap/Makefile | 23 +++++++++++++++--------

----------------------------------------------------------------------------

diff --git a/3rdparty/docker/bootstrap/Makefile 
b/3rdparty/docker/bootstrap/Makefile
index 65a25224d5..d67c4aa4d5 100644
--- a/3rdparty/docker/bootstrap/Makefile
+++ b/3rdparty/docker/bootstrap/Makefile
@@ -1,14 +1,21 @@
+ENGINE=docker
+#ENGINE=podman
+
+# Example mounting source code directory into container
+# (lets you "work on the code used to bootstrap" a bit easier)
+#EXTRA=-v $(HOME)/Code/haiku:/work/src/haiku
+
 default:
-       docker build . -t docker.io/haiku/bootstrap
+       ${ENGINE} build . -t docker.io/haiku/bootstrap
 clean:
-       docker ps -q --filter=ancestor=docker.io/haiku/bootstrap | xargs -I {} 
docker kill {}
-       docker ps -a -q --filter=ancestor=docker.io/haiku/bootstrap | xargs -I 
{} docker rm {}
-       docker volume rm bootstrap_work
+       ${ENGINE} ps -q --filter=ancestor=docker.io/haiku/bootstrap | xargs -I 
{} docker kill {}
+       ${ENGINE} ps -a -q --filter=ancestor=docker.io/haiku/bootstrap | xargs 
-I {} docker rm {}
+       ${ENGINE} volume rm bootstrap_work
 init:
-       docker run -v bootstrap_work:/work docker.io/haiku/bootstrap prep
+       ${ENGINE} run -v bootstrap_work:/work docker.io/haiku/bootstrap prep
 crosstools:
-       docker run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work 
docker.io/haiku/bootstrap crosstools
+       ${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work 
${EXTRA} docker.io/haiku/bootstrap crosstools
 bootstrap:
-       docker run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work 
docker.io/haiku/bootstrap bootstrap
+       ${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work 
${EXTRA} docker.io/haiku/bootstrap bootstrap
 enter:
-       docker run -it -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work 
docker.io/haiku/bootstrap /bin/bash -l
+       ${ENGINE} run -it -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work 
${EXTRA} docker.io/haiku/bootstrap /bin/bash -l


Other related posts:

  • » [haiku-commits] haiku: hrev53178 - 3rdparty/docker/bootstrap - Alex von Gluck IV