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

Commit b70faff

Browse files
Merge pull request #901 from thaJeztah/restore_docs
Restore docs before archiving
2 parents f0d51fb + c592027 commit b70faff

22 files changed

+888
-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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
description: FAQs, troubleshooting, and tips index for Toolbox installs
3+
identifier: toolbox_overview_faqs
4+
keywords: docker, documentation, about, technology, kitematic, gui, toolbox
5+
---
6+
7+
> ## Deprecation Notice :warning:
8+
>
9+
> Docker Toolbox is deprecated and is no longer in active development. Please use
10+
> [Docker Desktop](https://www.docker.com/products/docker-desktop) instead where
11+
> possible.
12+
13+
# FAQs and Troubleshooting
14+
15+
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).
16+
17+
By following the getting started, you'll learn fundamental Docker features by performing some simple tasks.
18+
19+
In the process of installing and setting up Docker, you might run into problems or have questions about configuration and setup.
20+
21+
* _**Looking for help with error messages?**_ Go to [Troubleshooting](troubleshoot.md).
22+
23+
&nbsp;

docs/faqs/troubleshoot.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
---
2+
description: Troubleshooting connectivity and certificate issues
3+
keywords: beginner, getting started, FAQs, troubleshooting, Docker
4+
---
5+
6+
> ## Deprecation Notice :warning:
7+
>
8+
> Docker Toolbox is deprecated and is no longer in active development. Please use
9+
> [Docker Desktop](https://www.docker.com/products/docker-desktop) instead where
10+
> possible.
11+
12+
# title: Troubleshooting
13+
14+
Typically, the QuickStart works out-of-the-box, but some scenarios can cause problems.
15+
16+
## Example errors
17+
18+
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`).
19+
20+
The errors you get might be specific to certificates, like this:
21+
22+
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
23+
24+
Others explicitly suggest regenerating certificates:
25+
26+
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
27+
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
28+
Be advised that this will trigger a Docker daemon restart which will stop running containers.
29+
30+
Or, indicate a network timeout, like this:
31+
32+
bash-3.2$ docker run hello-world
33+
Unable to find image 'hello-world:latest' locally
34+
Pulling repository docker.io/library/hello-world
35+
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.
36+
bash-3.2$
37+
38+
## Solutions
39+
40+
Here are some quick solutions to help get back on track. These examples assume the Docker host is a machine called `default`.
41+
42+
#### Regenerate certificates
43+
44+
Some errors explicitly tell you to regenerate certificates. You might also try this for other errors that are certificate and/or connectivity related.
45+
46+
$ docker-machine regenerate-certs default
47+
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
48+
Regenerating TLS certificates
49+
50+
#### Restart the Docker host
51+
52+
$ docker-machine restart default
53+
54+
After the machine starts, set the environment variables for the command window.
55+
56+
$ eval $(docker-machine env default)
57+
58+
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 (__*__).
59+
60+
$ docker-machine ls
61+
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
62+
default * virtualbox Running tcp://192.168.99.101:2376 v1.10.1
63+
64+
#### Stop the machine, remove it, and create a new one.
65+
66+
$ docker-machine stop default
67+
Stopping "default"...
68+
Machine "default" was stopped.
69+
70+
$ docker-machine rm default
71+
About to remove default
72+
Are you sure? (y/n): y
73+
Successfully removed default
74+
75+
You can use the `docker-machine create` command with the `virtualbox` driver to create a new machine called `default` (or any name you want for the machine).
76+
77+
$ docker-machine create --driver virtualbox default
78+
Running pre-create checks...
79+
(default) Default Boot2Docker ISO is out-of-date, downloading the latest release...
80+
(default) Latest release for github.com/boot2docker/boot2docker is v1.10.1
81+
(default) Downloading
82+
...
83+
Docker is up and running!
84+
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default
85+
86+
Set the environment variables for the command window.
87+
88+
$ eval $(docker-machine env default)
89+
90+
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 (__*__).
91+
92+
<a name="machine-http-proxy-solutions"></a>
93+
94+
## HTTP proxies and connectivity errors
95+
96+
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.
97+
98+
Here are examples of this type of error:
99+
100+
$ docker run hello-world
101+
An error occurred trying to connect: Post https://192.168.99.100:2376/v1.20/containers/create: Forbidden
102+
103+
$ docker run ubuntu echo "hi"
104+
An error occurred trying to connect: Post https://192.168.99.100:2376/v1.20/containers/create: Forbidden
105+
106+
### Configure HTTP proxy settings on Docker machines
107+
108+
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`.
109+
110+
You can reconfigure HTTP proxy settings for private networks on already-created Docker machines, such as the `default` machine, then change the configuration when you are using the same system on a different network.
111+
112+
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.
113+
114+
Both solutions are described below.
115+
116+
#### Update /var/lib/boot2docker/profile on the Docker machine
117+
118+
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.
119+
120+
This file lives on the VM itself, so you need to `ssh` into the machine, then edit and save the file there.
121+
122+
You can add your machine addresses as values for a `NO_PROXY` setting, and also specify 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.
123+
124+
1. Use `ssh` to log in to the virtual machine. This example logs in to the
125+
`default` machine.
126+
127+
$ docker-machine ssh default
128+
docker@default:~$ sudo vi /var/lib/boot2docker/profile
129+
130+
2. Add a `NO_PROXY` setting to the end of the file similar to the example below.
131+
132+
# replace with your office's proxy environment
133+
export "HTTP_PROXY=http://PROXY:PORT"
134+
export "HTTPS_PROXY=http://PROXY:PORT"
135+
# you can add more no_proxy with your environment.
136+
export "NO_PROXY=192.168.99.*,*.local,169.254/16,*.example.com,192.168.59.*"
137+
138+
3. Restart Docker.
139+
140+
After you modify the `profile` on your VM, restart Docker and log out of the machine.
141+
142+
docker@default:~$ sudo /etc/init.d/docker restart
143+
docker@default:~$ exit
144+
145+
Re-try Docker commands. Both Docker and Kitematic should run properly now.
146+
147+
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.
148+
149+
#### Create machines manually using --engine env to specify proxy settings
150+
151+
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.
152+
153+
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`.
154+
155+
docker-machine create -d virtualbox \
156+
--engine-env HTTP_PROXY=http://example.com:8080 \
157+
--engine-env HTTPS_PROXY=https://example.com:8080 \
158+
--engine-env NO_PROXY=example2.com \
159+
default
160+
161+
162+
To learn more about using `docker-machine create`, see the [create](../../machine/reference/create.md) command in the [Docker Machine](../../machine/overview.md) reference.
163+
164+
&nbsp;
119 KB
Loading

docs/images/b2d_shell.png

6.63 KB
Loading

docs/images/finish.png

24.2 KB
Loading

docs/images/icon-set.png

20.9 KB
Loading

docs/images/installer_open.png

26.8 KB
Loading

0 commit comments

Comments
 (0)