Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
61f9f407
Commit
61f9f407
authored
9 years ago
by
Paul Bourke
Browse files
Options
Downloads
Patches
Plain Diff
Add documentation around how to build behind a proxy
Change-Id: Ie0e69f72a9f4c4c1eee897d2b48b4318c3b94638
parent
7b73bc95
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/image-building.rst
+36
-0
36 additions, 0 deletions
doc/image-building.rst
with
36 additions
and
0 deletions
doc/image-building.rst
+
36
−
0
View file @
61f9f407
...
@@ -190,4 +190,40 @@ images from insecure registry. See
...
@@ -190,4 +190,40 @@ images from insecure registry. See
`Docker Insecure Registry Config`_.
`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
.. _DockerBug: https://github.com/docker/docker/issues/6980
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment