aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Han-Wen Nienhuys <hanwen@google.com>2015-03-19 16:53:35 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-03-20 14:37:38 +0000
commit29ca242ab39ee583fe1c227614ada246e6fcb02d (patch)
tree76a8c3afabcfac63ab6e187d9a44d9b0dd7caece
parent51c6e70aa587bb1cec9b480a8c7478230b35f031 (diff)
Add more info about Docker vs. Bazel.
-- MOS_MIGRATED_REVID=89039766
-rw-r--r--docs/FAQ.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/FAQ.md b/docs/FAQ.md
index 28e77b1d70..aaa5df435c 100644
--- a/docs/FAQ.md
+++ b/docs/FAQ.md
@@ -278,6 +278,38 @@ the same mechanism as changes to base libraries ("fix bounds check in
OpenSSL").
+Can I build binaries for deployment on Docker?
+----------------------------------------------
+
+With Bazel, you can build standalone, statically linked binaries in
+C(++), and self-contained jar files for Java. These run with few
+dependencies on normal Unix systems, and as such should be simple to
+install inside a Docker container.
+
+Bazel has conventions for structuring more complex programs, e.g., a
+Java program that consumes a set of data files, or runs another
+program as subprocess. It is possible to package up such environments
+as standalone archives, so they can be deployed on different systems,
+including Docker images. We currently don't have code to do this,
+though.
+
+
+Can I build Docker images with Bazel?
+-------------------------------------
+
+Bazel builds programs such that they are reproducible with respect to
+the source tree used to build them. By design, Bazel does not know
+about the environment outside the source tree. Therefore, it does not
+know what Docker image would be consistent with its own
+environment. So, if you use Bazel with Docker, we recommend to run
+Bazel in an environment that resembles the deployment environment to
+ensure repeatability.
+
+It is possible to write rules that generate Docker images as files.
+However, since Docker images reflect live filesystems, they are full
+of timestamps, which makes reproducibility challenging.
+
+
Will Bazel make my builds reproducible automatically?
-----------------------------------------------------