[tor-commits] [tor-browser-build/master] Add docker_image_prefix option to rbm.local.conf

boklm at torproject.org boklm at torproject.org
Tue Feb 14 00:36:10 UTC 2017


commit e30719ad9b5ad2c63156d88e63a5d4a082021455
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Tue Feb 14 01:31:22 2017 +0100

    Add docker_image_prefix option to rbm.local.conf
---
 README                       | 12 ++++++++++++
 projects/docker-image/config |  1 -
 rbm.conf                     |  1 +
 rbm.local.conf.example       |  6 ++++++
 4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/README b/README
index 956e162..e3672ec 100644
--- a/README
+++ b/README
@@ -169,6 +169,18 @@ There will be a script to clean old build files and containers that are
 no longer used, but it has not been added yet.
 
 
+Multiple build directories on the same host
+-------------------------------------------
+
+You can do multiple builds of Tor Browser in different directories on
+the same host. However the docker images namespace is global, so you
+may have some conflicts with the same image names used by the
+different builds. By default, the docker images are prefixed with
+tor-browser_$USER. You can change this prefix by defining the
+docker_image_prefix option in rbm.local.conf, using a different prefix
+for each of your build directories.
+
+
 Common Build Errors
 -------------------
 
diff --git a/projects/docker-image/config b/projects/docker-image/config
index 27d2654..1968b77 100644
--- a/projects/docker-image/config
+++ b/projects/docker-image/config
@@ -1,7 +1,6 @@
 # vim: filetype=yaml sw=2
 filename: '[% sha256(c("pre")).substr(0, 12) %]'
 remote_docker: 1
-docker_image_prefix: '[% GET c("var/project_name") ? c("var/project_name") : "rbm-build" %]_[% GET ENV.RBM_BUILDNAME ? ENV.RBM_BUILDNAME : ENV.USER ? ENV.USER : c("uid") %]'
 docker_save_image: '[% c("docker_image_prefix") %]:[% c("filename") %]'
 pkg_type: build
 
diff --git a/rbm.conf b/rbm.conf
index 5dfdc30..47ffbfb 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -155,6 +155,7 @@ targets:
 
 
 docker_image: '[% pc("docker-image", "docker_save_image") %]'
+docker_image_prefix: '[% GET c("var/project_name") ? c("var/project_name") : "rbm-build" %]_[% GET ENV.RBM_BUILDNAME ? ENV.RBM_BUILDNAME : ENV.USER ? ENV.USER : c("uid") %]'
 
 # change the default gpg_wrapper to allow git tag signed using an
 # expired key.
diff --git a/rbm.local.conf.example b/rbm.local.conf.example
index 42bf431..20f081f 100644
--- a/rbm.local.conf.example
+++ b/rbm.local.conf.example
@@ -16,6 +16,12 @@
 ### this.
 #debug: 0
 
+### If you are doing multiple builds in different directories on the
+### same host, you should define docker_image_prefix with a different
+### value for each build directory, so that the different builds don't
+### use the same docker image names.
+#docker_image_prefix: tor-browser_XXXXX
+
 var:
   local_conf: 1
 



More information about the tor-commits mailing list