Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

Commit 8159b2e

Browse files
committed
Revert "remove docs from toolbox repo, add README points to docs repo"
This reverts commit 173a6d3. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent f0d51fb commit 8159b2e

22 files changed

+711
-11
lines changed

docs/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM docs/base:oss
2+
MAINTAINER Docker Docs <docs@docker.com>
3+
4+
ENV PROJECT=toolbox
5+
# to get the git info for this repo
6+
COPY . /src
7+
RUN rm -rf /docs/content/$PROJECT/
8+
COPY . /docs/content/$PROJECT/

docs/Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.PHONY: all default docs docs-build docs-shell shell test
2+
3+
# to allow `make DOCSDIR=docs docs-shell` (to create a bind mount in docs)
4+
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
5+
6+
# to allow `make DOCSPORT=9000 docs`
7+
DOCSPORT := 8000
8+
9+
# Get the IP ADDRESS
10+
DOCKER_IP=$(shell python -c "import urlparse ; print urlparse.urlparse('$(DOCKER_HOST)').hostname or ''")
11+
HUGO_BASE_URL=$(shell test -z "$(DOCKER_IP)" && echo localhost || echo "$(DOCKER_IP)")
12+
HUGO_BIND_IP=0.0.0.0
13+
14+
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
15+
DOCKER_IMAGE := docker$(if $(GIT_BRANCH),:$(GIT_BRANCH))
16+
DOCKER_DOCS_IMAGE := docs-base$(if $(GIT_BRANCH),:$(GIT_BRANCH))
17+
18+
19+
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
20+
21+
# for some docs workarounds (see below in "docs-build" target)
22+
GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
23+
24+
default: docs
25+
26+
docs: docs-build
27+
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
28+
29+
docs-draft: docs-build
30+
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --buildDrafts="true" --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
31+
32+
33+
docs-shell: docs-build
34+
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
35+
36+
test: docs-build
37+
$(DOCKER_RUN_DOCS) "$(DOCKER_DOCS_IMAGE)"
38+
39+
docs-build:
40+
docker build -t "$(DOCKER_DOCS_IMAGE)" .

docs/README.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/faqs/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--[metadata]>
2+
+++
3+
title = "FAQs"
4+
description = "FAQs, troubleshooting, and tips index for Toolbox installs"
5+
keywords = ["docker, documentation, about, technology, kitematic, gui, toolbox"]
6+
identifier = "toolbox_overview_faqs"
7+
+++
8+
<![end-metadata]-->
9+
10+
# FAQs and Troubleshooting
11+
12+
This is a frequently asked questions (FAQs) and troubleshooting guide for non-technical users who are learning about Docker, starting with [Docker Toolbox](https://www.docker.com/products/docker-toolbox).
13+
14+
By following the getting started, you'll learn fundamental Docker features by performing some simple tasks.
15+
16+
In the process of installing and setting up Docker, you might run into problems or have questions about configuration and setup.
17+
18+
* _**Looking for help with error messages?**_ Go to [Troubleshooting](troubleshoot.md).
19+
20+
&nbsp;

docs/faqs/troubleshoot.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
<!--[metadata]>
2+
+++
3+
title = "Troubleshooting"
4+
description = "Troubleshooting connectivity and certificate issues"
5+
keywords = ["beginner, getting started, FAQs, troubleshooting, Docker"]
6+
[menu.main]
7+
parent="workw_toolbox"
8+
weight=4
9+
+++
10+
<![end-metadata]-->
11+
12+
# Troubleshooting
13+
Typically, the QuickStart works out-of-the-box, but some scenarios can cause problems.
14+
15+
## Example errors
16+
17+
You might get errors when attempting to connect to a machine (such as with `docker-machine env default`) or pull an image from Docker Hub (as with `docker run hello-world`).
18+
19+
The errors you get might be specific to certificates, like this:
20+
21+
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: i/o timeout
22+
23+
Others will explicitly suggest regenerating certificates:
24+
25+
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": x509: certificate is valid for 192.168.99.101, not 192.168.99.100
26+
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
27+
Be advised that this will trigger a Docker daemon restart which will stop running containers.
28+
29+
Or, indicate a network timeout, like this:
30+
31+
bash-3.2$ docker run hello-world
32+
Unable to find image 'hello-world:latest' locally
33+
Pulling repository docker.io/library/hello-world
34+
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy.
35+
bash-3.2$
36+
37+
## Solutions
38+
39+
Here are some quick solutions to help get back on track. These examples assume the Docker host is a machine called `default`.
40+
41+
#### Regenerate certificates
42+
43+
Some errors explicitly tell you to regenerate certificates. You might also try this for other errors that are certificate and /or connectivity related.
44+
45+
$ docker-machine regenerate-certs default
46+
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
47+
Regenerating TLS certificates
48+
49+
#### Restart the Docker host
50+
51+
$ docker-machine restart default
52+
53+
After the machine starts, set the environment variables for the command window.
54+
55+
$ eval $(docker-machine env default)
56+
57+
Run `docker-machine ls` to verify that the machine is running and that this command window is configured to talk to it, as indicated by an asterisk for the active machine (__*__).
58+
59+
$ docker-machine ls
60+
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
61+
default * virtualbox Running tcp://192.168.99.101:2376 v1.10.1
62+
63+
#### Stop the machine, remove it, and create a new one.
64+
65+
$ docker-machine stop default
66+
Stopping "default"...
67+
Machine "default" was stopped.
68+
69+
$ docker-machine rm default
70+
About to remove default
71+
Are you sure? (y/n): y
72+
Successfully removed default
73+
74+
You can use the command `docker-machine create` command with the `virtualbox` driver to create a new machine called `default` (or any name you want for the machine).
75+
76+
$ docker-machine create --driver virtualbox default
77+
Running pre-create checks...
78+
(default) Default Boot2Docker ISO is out-of-date, downloading the latest release...
79+
(default) Latest release for github.com/boot2docker/boot2docker is v1.10.1
80+
(default) Downloading
81+
...
82+
Docker is up and running!
83+
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default
84+
85+
Set the environment variables for the command window.
86+
87+
$ eval $(docker-machine env default)
88+
89+
Run `docker-machine ls` to verify that the new machine is running and that this command window is configured to talk to it, as indicated by an asterisk for the active machine (__*__).
90+
91+
<a name="machine-http-proxy-solutions"></a>
92+
## HTTP proxies and connectivity errors
93+
94+
A special brand of connectivity errors can be caused by HTTP proxy. If you install Docker Toolbox on a system using a virtual private network (VPN) that uses an HTTP proxy (such as a corporate network), you might encounter errors when the client attempts to connect to the server.
95+
96+
Here are examples of this type of error:
97+
98+
$ docker run hello-world
99+
An error occurred trying to connect: Post https://192.168.99.100:2376/v1.20/containers/create: Forbidden
100+
101+
$ docker run ubuntu echo "hi"
102+
An error occurred trying to connect: Post https://192.168.99.100:2376/v1.20/containers/create: Forbidden
103+
104+
### Configuring HTTP proxy settings on Docker machines
105+
106+
When Toolbox creates virtual machines (VMs) it runs `start.sh`, where it gets values for `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY`, and passes them as `create` options to create the `default machine`.
107+
108+
You can reconfigure HTTP proxy settings for private networks on already-created Docker machines (e.g., `default`), then change the configuration when you are using the same system on a different network.
109+
110+
Alternatively, you can modify proxy settings on your machine(s) manually through the configuration file at `/var/lib/boot2docker/profile` inside the VM, or configure proxy settings as a part of a `docker-machine create` command.
111+
112+
Both solutions are described below.
113+
114+
#### Update /var/lib/boot2docker/profile on the Docker machine
115+
116+
One way to solve this problem is to update the file `/var/lib/boot2docker/profile` on an existing machine to specify the proxy settings you want.
117+
118+
This file lives on the VM itself, so you have to `ssh` into the machine, then edit and save the file there.
119+
120+
You can add your machine addresses as values for a `NO_PROXY` setting, and also speicify proxy servers that you know about and you want to use. Typically setting your Docker machine URLs to `NO_PROXY` solves this type of connectivity problem, so that example is shown here.
121+
122+
1. Use `ssh` to log in to the virtual machine (e.g., `default`).
123+
124+
$ docker-machine ssh default
125+
docker@default:~$ sudo vi /var/lib/boot2docker/profile
126+
127+
2. Add a `NO_PROXY` setting to the end of the file similar to the example below.
128+
129+
# replace with your office's proxy environment
130+
export "HTTP_PROXY=http://PROXY:PORT"
131+
export "HTTPS_PROXY=http://PROXY:PORT"
132+
# you can add more no_proxy with your environment.
133+
export "NO_PROXY=192.168.99.*,*.local,169.254/16,*.example.com,192.168.59.*"
134+
135+
3. Restart Docker.
136+
137+
After you modify the `profile` on your VM, restart Docker and log out of the machine.
138+
139+
docker@default:~$ sudo /etc/init.d/docker restart
140+
docker@default:~$ exit
141+
142+
Re-try Docker commands. Both Docker and Kitematic should run properly now.
143+
144+
When you move to a different network (for example, leave the office's corporate network and return home), remove or comment out these proxy settings in `/var/lib/boot2docker/profile` and restart Docker.
145+
146+
#### Create machines manually using --engine env to specify proxy settings
147+
148+
Rather than reconfigure automatically-created machines, you can delete them and create your `default` machine and others manually with the `docker-machine create` command, using the `--engine env` flag to specify the proxy settings you want.
149+
150+
Here is an example of creating a `default` machine with proxies set to `http://example.com:8080` and `https://example.com:8080`, and a `N0_PROXY` setting for the server `example2.com`.
151+
152+
docker-machine create -d virtualbox \
153+
--engine-env HTTP_PROXY=http://example.com:8080 \
154+
--engine-env HTTPS_PROXY=https://example.com:8080 \
155+
--engine-env NO_PROXY=example2.com \
156+
default
157+
158+
159+
To learn more about using `docker-machine create`, see the [create](https://docs.docker.com/machine/reference/create/) command in the [Docker Machine](https://docs.docker.com/machine/overview/) reference.
160+
161+
&nbsp;
194 KB
Loading

docs/images/b2d_shell.png

16.6 KB
Loading

docs/images/finish.png

39.3 KB
Loading

docs/images/icon-set.png

28.9 KB
Loading

docs/images/installer_open.png

45.5 KB
Loading

0 commit comments

Comments
 (0)