diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-10-22 17:52:30 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-10-22 17:52:30 +0000 |
| commit | 2d5293d7c95b1872c955a9aa4ad2effc163b1c70 (patch) | |
| tree | 7729abb1c24c039159a13544b652b5be376b12d1 | |
| parent | d99da3531f2df65399eff108ca67f710d549cb2b (diff) | |
| parent | 61f9f407c4bc17e43af3365e7d8497712c8f21c1 (diff) | |
| download | kolla-2d5293d7c95b1872c955a9aa4ad2effc163b1c70.tar.gz kolla-2d5293d7c95b1872c955a9aa4ad2effc163b1c70.zip | |
Merge "Add documentation around how to build behind a proxy"
| -rw-r--r-- | doc/image-building.rst | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/image-building.rst b/doc/image-building.rst index d02c8322c..ea98cb888 100644 --- a/doc/image-building.rst +++ b/doc/image-building.rst @@ -190,4 +190,40 @@ images from insecure registry. See `Docker Insecure Registry Config`_. +Building behind a proxy ++++++++++++++++++++++++ + +The build script supports augmenting the Dockerfiles under build via so called +`header` and `footer` files. Statements in the `header` file are included at +the top of the `base` image, while those in `footer` are included at the bottom +of every Dockerfile in the build. + +A common use case for this is to insert http_proxy settings into the images to +fetch packages during build, and then unset them at the end to avoid having +them carry through to the environment of the final images. Note however, it's +not possible to drop the info completely using this method; it will still be +visible in the layers of the image. + +To use this feature, create a file called ``.header``, with the following +content for example: + +:: + + ENV http_proxy=https://evil.corp.proxy:80 + ENV https_proxy=https://evil.corp.proxy:80 + +Then create another file called ``.footer``, with the following content: + +:: + + ENV http_proxy="" + ENV https_proxy="" + +Finally, pass them to the build script using the ``-i`` and ``-I`` flags: + +:: + + tools/build.py -i .header -I .footer + + .. _DockerBug: https://github.com/docker/docker/issues/6980 |
