Skip to content

Commit

Permalink
added note re: setting ENV variables for proxy servers in Dockerfile (d…
Browse files Browse the repository at this point in the history
…ocker#4759)

* added note re: setting ENV variables for proxy servers in Dockerfile

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* review comments

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* reworded note title, removed link out to ENV per review comments

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* added info to docs test page about how to link to auto-generated reference pages

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* added more info to test on re: linking

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* format ENV as a command

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
  • Loading branch information
londoncalling authored Sep 29, 2017
1 parent d77ebe6 commit 788532f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
19 changes: 17 additions & 2 deletions get-started/part2.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ after doing that, you can expect that the build of your app defined in this

### `Dockerfile`

Create an empty directory. Change directories (`cd`) into the new directory, create a file called
`Dockerfile`, copy-and-paste the following content into that file, and save it. Take note of the comments that explain each statement in your new Dockerfile.
Create an empty directory. Change directories (`cd`) into the new directory,
create a file called `Dockerfile`, copy-and-paste the following content into
that file, and save it. Take note of the comments that explain each statement in
your new Dockerfile.

```conf
# Use an official Python runtime as a parent image
Expand All @@ -82,6 +84,19 @@ ENV NAME World
CMD ["python", "app.py"]
```

> Are you behind a proxy server?
>
> Proxy servers can block connections to your web app once it's up and running.
> If you are behind a proxy server, add the following lines to your
> Dockerfile, using the `ENV` command to specify the host and port for your
> proxy servers:
>
> ```conf
> # Set proxy server, replace host:/port with values for your servers
> ENV http_proxy host:/port
> ENV https_proxy host:/port
> ```
This `Dockerfile` refers to a couple of files we haven't created yet, namely
`app.py` and `requirements.txt`. Let's create those next.
Expand Down
2 changes: 1 addition & 1 deletion get-started/part3.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ version: "3"
services:
web:
# replace username/repo:tag with your name and image details
image: username/repository:tag
image: username/repo:tag
deploy:
replicas: 5
resources:
Expand Down
4 changes: 2 additions & 2 deletions get-started/part4.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ From here you can do everything you learned about in parts 2 and 3.

Scale the app by changing the `docker-compose.yml` file.

Change the app behavior by editing code, rebuild, and push the new image. (To
do this, follow the same steps you took earlier to [build the
Change the app behavior by editing code, then rebuild, and push the new image.
(To do this, follow the same steps you took earlier to [build the
app](part2.md#build-the-app) and [publish the
image](part2.md#publish-the-image)).

Expand Down
17 changes: 16 additions & 1 deletion test.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,22 @@ https://github.com/docker/docker.github.io/tree/master/docker-cloud/images

- A link to a Github PR in `docker/docker.github.io`: {% include github-pr.md repo=docker.github.io pr=9999 %}

(you can also specify `org=foo` to use a Github organization other than Docker).
- You can specify `org=foo` to use a Github organization other than Docker

- A link to an auto-generated reference page that we pull in during docs builds:
[/engine/reference/builder/#env](/engine/reference/builder/#env).

- If you can't find a reference page in the `docker.github.io`
GitHub repository, but see it out on `docs.docker.com`, you can
surmise that it's probably auto-generated from the codebase.
(FYI, to view the markdown source for the file, just click
**Edit this page** on `docs.docker.com`. But don't use that URL in your docs.)

- Go to the file in a web browser, grab everything after the domain name
from the URL, and use that as the link in your docs file.

- Keep in mind that this link won't resolve until you merge the PR and
your docs are published on [docs.docker.com](https://docs.docker.com/).

{: id="custom-target-id"}

Expand Down

0 comments on commit 788532f

Please sign in to comment.