From 5c246f5fa9ca8071739902075b6765f0789cb1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Wed, 23 Jul 2014 10:23:14 +0200 Subject: Fixed parent-child relationship description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "db" is the parent image, and "web" links to it as the child image. There was a typo in the document which reversed the relation. (cherry picked from commit 0a4b39b6a4e9faeea5d8c679e7b03e317a7b02f9) Docker-DCO-1.1-Signed-off-by: Roland Huß (github: SvenDowideit) --- docs/sources/userguide/dockerlinks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/userguide/dockerlinks.md b/docs/sources/userguide/dockerlinks.md index d7a2abff9c..c1d8c14681 100644 --- a/docs/sources/userguide/dockerlinks.md +++ b/docs/sources/userguide/dockerlinks.md @@ -162,8 +162,8 @@ containers also shows `web/db` in the `NAMES` column. This tells us that the `web` container is linked to the `db` container in a parent/child relationship. So what does linking the containers do? Well we've discovered the link creates -a parent-child relationship between the two containers. The parent container, -here `web`, can access information on the child container `db`. To do this +a parent-child relationship between the two containers. The child container, +here `web`, can access information on the parent container `db`. To do this Docker creates a secure tunnel between the containers without the need to expose any ports externally on the container. You'll note when we started the `db` container we did not use either of the `-P` or `-p` flags. As we're -- cgit v1.2.1 From c848eb93c24ffeff755eff4bd8ffdeddc63aacb6 Mon Sep 17 00:00:00 2001 From: Tim Ruffles Date: Wed, 23 Jul 2014 12:11:14 +0100 Subject: [DOCS] replace foo/bar with concrete names namespaces are not well documented, and I had to jump around to other docs. replacing `foo/bar` hopefully makes what's going on here a bit more obvious. Docker-DCO-1.1-Signed-off-by: Tim Ruffles (github: timruffles) (cherry picked from commit 455e837e207a01153947fc81e3a22d6bb37d2c89) Docker-DCO-1.1-Signed-off-by: Tim Ruffles (github: SvenDowideit) --- docs/sources/reference/api/registry_api.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/sources/reference/api/registry_api.md b/docs/sources/reference/api/registry_api.md index a3d4f23d66..49776b9b18 100644 --- a/docs/sources/reference/api/registry_api.md +++ b/docs/sources/reference/api/registry_api.md @@ -67,6 +67,8 @@ The latter would only require two new commands in docker, e.g., (and optionally doing consistency checks). Authentication and authorization are then delegated to SSH (e.g., with public keys). +The default namespace for a private repository is `library`. + # Endpoints ## Images @@ -305,7 +307,7 @@ Get all of the tags for the given repo. **Example Request**: - GET /v1/repositories/foo/bar/tags HTTP/1.1 + GET /v1/repositories/reynholm/help-system-server/tags HTTP/1.1 Host: registry-1.docker.io Accept: application/json Content-Type: application/json @@ -341,7 +343,7 @@ Get a tag for the given repo. **Example Request**: - GET /v1/repositories/foo/bar/tags/latest HTTP/1.1 + GET /v1/repositories/reynholm/help-system-server/tags/latest HTTP/1.1 Host: registry-1.docker.io Accept: application/json Content-Type: application/json @@ -375,7 +377,7 @@ Delete the tag for the repo **Example Request**: - DELETE /v1/repositories/foo/bar/tags/latest HTTP/1.1 + DELETE /v1/repositories/reynholm/help-system-server/tags/latest HTTP/1.1 Host: registry-1.docker.io Accept: application/json Content-Type: application/json @@ -408,7 +410,7 @@ Put a tag for the given repo. **Example Request**: - PUT /v1/repositories/foo/bar/tags/latest HTTP/1.1 + PUT /v1/repositories/reynholm/help-system-server/tags/latest HTTP/1.1 Host: registry-1.docker.io Accept: application/json Content-Type: application/json @@ -446,7 +448,7 @@ Delete a repository **Example Request**: - DELETE /v1/repositories/foo/bar/ HTTP/1.1 + DELETE /v1/repositories/reynholm/help-system-server/ HTTP/1.1 Host: registry-1.docker.io Accept: application/json Content-Type: application/json -- cgit v1.2.1 From 366a27593542c83bf741d1b8683402ea7339893d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 23 Jul 2014 14:44:17 +0200 Subject: Fix incorrect path in ENTRYPOINT example The ENTRYPOINT example uses "/usr/bin/ls" as path, but `ls` is located at `/bin/ls`. Docker-DCO-1.1-Signed-off-by: Sebastiaan van Stijn (github: thaJeztah) (cherry picked from commit 2819d9b4062914daa5b6bd4d08676807859eae3f) Docker-DCO-1.1-Signed-off-by: Sebastiaan van Stijn (github: SvenDowideit) --- docs/sources/reference/builder.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/reference/builder.md b/docs/sources/reference/builder.md index 57ddb52984..611b0294ff 100644 --- a/docs/sources/reference/builder.md +++ b/docs/sources/reference/builder.md @@ -409,7 +409,7 @@ optional but default, you could use a `CMD` instruction: FROM ubuntu CMD ["-l"] - ENTRYPOINT ["/usr/bin/ls"] + ENTRYPOINT ["ls"] > **Note**: > It is preferable to use the JSON array format for specifying -- cgit v1.2.1 From d828d3df44f112f99510d135b8081d98df6d54c7 Mon Sep 17 00:00:00 2001 From: "Michiel@unhosted" Date: Fri, 25 Jul 2014 09:06:38 +0200 Subject: Typo in dockervolumes.md line 141? (cherry picked from commit 9503afbc9116b06585cf42715a7ae0bcd0fb7881) Docker-DCO-1.1-Signed-off-by: Michiel@unhosted (github: SvenDowideit) --- docs/sources/userguide/dockervolumes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/userguide/dockervolumes.md b/docs/sources/userguide/dockervolumes.md index 42b01ecf8b..4e1cd51edb 100644 --- a/docs/sources/userguide/dockervolumes.md +++ b/docs/sources/userguide/dockervolumes.md @@ -138,7 +138,7 @@ contents of the `dbdata` volume to a `backup.tar` file inside our `/backup` directory. When the command completes and the container stops we'll be left with a backup of our `dbdata` volume. -You could then to restore to the same container, or another that you've made +You could then restore it to the same container, or another that you've made elsewhere. Create a new container. $ sudo docker run -v /dbdata --name dbdata2 ubuntu /bin/bash -- cgit v1.2.1 From 007b5cd7a9cd1015f7048e4b3ee3587ab367105a Mon Sep 17 00:00:00 2001 From: Andrew Weiss Date: Fri, 25 Jul 2014 14:28:36 -0400 Subject: updated article to reflect changes in config; fixed hyperlinks #7243 Docker-DCO-1.1-Signed-off-by: Andrew Weiss (github: anweiss) (cherry picked from commit 7a5db6df995a131579020fd2cbacd49cb82e0aea) Docker-DCO-1.1-Signed-off-by: Andrew Weiss (github: SvenDowideit) --- docs/sources/articles/dsc.md | 90 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 20 deletions(-) diff --git a/docs/sources/articles/dsc.md b/docs/sources/articles/dsc.md index 94f5e9d4db..5e05c40c14 100644 --- a/docs/sources/articles/dsc.md +++ b/docs/sources/articles/dsc.md @@ -8,7 +8,7 @@ Windows PowerShell Desired State Configuration (DSC) is a configuration management tool that extends the existing functionality of Windows PowerShell. DSC uses a declarative syntax to define the state in which a target should be configured. More information about PowerShell DSC can be found at -http://technet.microsoft.com/en-us/library/dn249912.aspx. +[http://technet.microsoft.com/en-us/library/dn249912.aspx](http://technet.microsoft.com/en-us/library/dn249912.aspx). ## Requirements @@ -17,14 +17,14 @@ To use this guide you'll need a Windows host with PowerShell v4.0 or newer. The included DSC configuration script also uses the official PPA so only an Ubuntu target is supported. The Ubuntu target must already have the required OMI Server and PowerShell DSC for Linux providers installed. More -information can be found at https://github.com/MSFTOSSMgmt/WPSDSCLinux. The -source repository listed below also includes PowerShell DSC for Linux +information can be found at [https://github.com/MSFTOSSMgmt/WPSDSCLinux](https://github.com/MSFTOSSMgmt/WPSDSCLinux). +The source repository listed below also includes PowerShell DSC for Linux installation and init scripts along with more detailed installation information. ## Installation The DSC configuration example source is available in the following repository: -https://github.com/anweiss/DockerClientDSC. It can be cloned with: +[https://github.com/anweiss/DockerClientDSC](https://github.com/anweiss/DockerClientDSC). It can be cloned with: $ git clone https://github.com/anweiss/DockerClientDSC.git @@ -37,15 +37,18 @@ be used to establish the required CIM session(s) and execute the `Set-DscConfiguration` cmdlet. More detailed usage information can be found at -https://github.com/anweiss/DockerClientDSC. +[https://github.com/anweiss/DockerClientDSC](https://github.com/anweiss/DockerClientDSC). -### Run Configuration +### Install Docker The Docker installation configuration is equivalent to running: ``` -apt-get install docker.io -ln -sf /usr/bin/docker.io /usr/local/bin/docker -sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io +apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys\ +36A1D7869245C8950F966E92D8576A8BA88D21E9 +sh -c "echo deb https://get.docker.io/ubuntu docker main\ +> /etc/apt/sources.list.d/docker.list" +apt-get update +apt-get install lxc-docker ``` Ensure that your current working directory is set to the `DockerClientDSC` @@ -83,35 +86,82 @@ file and execute configurations against multiple nodes as such: ``` ### Images -Image configuration is equivalent to running: `docker pull [image]`. +Image configuration is equivalent to running: `docker pull [image]` or +`docker rmi -f [IMAGE]`. -Using the same Run Configuration steps defined above, execute `DockerClient` -with the `Image` parameter: +Using the same steps defined above, execute `DockerClient` with the `Image` +parameter and apply the configuration: ```powershell -DockerClient -Hostname "myhost" -Image node +DockerClient -Hostname "myhost" -Image "node" +.\RunDockerClientConfig.ps1 -Hostname "myhost" ``` -The configuration process can be initiated as before: +You can also configure the host to pull multiple images: ```powershell +DockerClient -Hostname "myhost" -Image "node","mongo" .\RunDockerClientConfig.ps1 -Hostname "myhost" ``` +To remove images, use a hashtable as follows: + +```powershell +DockerClient -Hostname "myhost" -Image @{Name="node"; Remove=$true} +.\RunDockerClientConfig.ps1 -Hostname $hostname +``` + ### Containers Container configuration is equivalent to running: -`docker run -d --name="[containername]" [image] '[command]'`. -Using the same Run Configuration steps defined above, execute `DockerClient` -with the `Image`, `ContainerName`, and `Command` parameters: +``` +docker run -d --name="[containername]" -p '[port]' -e '[env]' --link '[link]'\ +'[image]' '[command]' +``` +or + +``` +docker rm -f [containername] +``` + +To create or remove containers, you can use the `Container` parameter with one +or more hashtables. The hashtable(s) passed to this parameter can have the +following properties: + +- Name (required) +- Image (required unless Remove property is set to `$true`) +- Port +- Env +- Link +- Command +- Remove + +For example, create a hashtable with the settings for your container: + +```powershell +$webContainer = @{Name="web"; Image="anweiss/docker-platynem"; Port="80:80"} +``` + +Then, using the same steps defined above, execute +`DockerClient` with the `-Image` and `-Container` parameters: ```powershell -DockerClient -Hostname "myhost" -Image node -ContainerName "helloworld" ` --Command 'echo "Hello World!"' +DockerClient -Hostname "myhost" -Image node -Container $webContainer +.\RunDockerClientConfig.ps1 -Hostname "myhost" ``` -The configuration process can be initiated as before: +Existing containers can also be removed as follows: ```powershell +$containerToRemove = @{Name="web"; Remove=$true} +DockerClient -Hostname "myhost" -Container $containerToRemove .\RunDockerClientConfig.ps1 -Hostname "myhost" ``` + +Here is a hashtable with all of the properties that can be used to create a +container: + +```powershell +$containerProps = @{Name="web"; Image="node:latest"; Port="80:80"; ` +Env="PORT=80"; Link="db:db"; Command="grunt"} +``` \ No newline at end of file -- cgit v1.2.1 From 9f36f914be2d7f121be9c190c121b8933a65b4e0 Mon Sep 17 00:00:00 2001 From: Deric Crago Date: Fri, 25 Jul 2014 10:14:52 -0400 Subject: apache2 was looking for two other directories /var/lock/apache2 /var/run/apache2 (cherry picked from commit 3fb913ab7712634f1f311a9aab47c5eaa9f8fe9d) Docker-DCO-1.1-Signed-off-by: Deric Crago (github: SvenDowideit) --- docs/sources/articles/using_supervisord.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/sources/articles/using_supervisord.md b/docs/sources/articles/using_supervisord.md index 9188265199..90aefb4b94 100644 --- a/docs/sources/articles/using_supervisord.md +++ b/docs/sources/articles/using_supervisord.md @@ -38,6 +38,7 @@ We can now install our SSH and Apache daemons as well as Supervisor in our container. RUN apt-get install -y openssh-server apache2 supervisor + RUN mkdir -p /var/lock/apache2 /var/run/apache2 RUN mkdir -p /var/run/sshd RUN mkdir -p /var/log/supervisor -- cgit v1.2.1 From 37b33833cb494c952c286d642e1c943b92e5e0e9 Mon Sep 17 00:00:00 2001 From: knappe Date: Mon, 28 Jul 2014 14:39:17 -0600 Subject: Correct Typo In Documentation (cherry picked from commit 331200cbaae75a2876bac037c8df2e609bab9658) Docker-DCO-1.1-Signed-off-by: knappe (github: SvenDowideit) --- docs/sources/userguide/dockervolumes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/userguide/dockervolumes.md b/docs/sources/userguide/dockervolumes.md index 4e1cd51edb..97593a1e04 100644 --- a/docs/sources/userguide/dockervolumes.md +++ b/docs/sources/userguide/dockervolumes.md @@ -131,7 +131,7 @@ like so: $ sudo docker run --volumes-from dbdata -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /dbdata -Here's we've launched a new container and mounted the volume from the +Here we've launched a new container and mounted the volume from the `dbdata` container. We've then mounted a local host directory as `/backup`. Finally, we've passed a command that uses `tar` to backup the contents of the `dbdata` volume to a `backup.tar` file inside our -- cgit v1.2.1 From b010f144d00582f927b007d825fad1327ffdc214 Mon Sep 17 00:00:00 2001 From: r0n22 Date: Mon, 28 Jul 2014 09:39:55 -0400 Subject: Update HTTP Proxy Section Docker.service file location was missing the /usr dir. (cherry picked from commit 2095e22121833e5d38890c321a7a67ead405e3ec) Docker-DCO-1.1-Signed-off-by: r0n22 (github: SvenDowideit) --- docs/sources/installation/fedora.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/installation/fedora.md b/docs/sources/installation/fedora.md index a230aa6cf5..757b3e9c44 100644 --- a/docs/sources/installation/fedora.md +++ b/docs/sources/installation/fedora.md @@ -68,7 +68,7 @@ and above. If you are behind a HTTP proxy server, for example in corporate settings, you will need to add this configuration in the Docker *systemd service file*. -Edit file `/lib/systemd/system/docker.service`. Add the following to +Edit file `/usr/lib/systemd/system/docker.service`. Add the following to section `[Service]` : Environment="HTTP_PROXY=http://proxy.example.com:80/" -- cgit v1.2.1 From a57e7136291ebcbec226499825fa4736b5272c3f Mon Sep 17 00:00:00 2001 From: Julien Bordellier Date: Sat, 26 Jul 2014 13:03:04 +0200 Subject: Adding the query parameters to insert api call for all <= 1.10 and removing the insert documentation for > 1.10 since it has been removed in 1.11. This commit fixes #7183 Docker-DCO-1.1-Signed-off-by: Julien Bordellier (github: jstoja) (cherry picked from commit 2d84b877bdce5e26aac164e14815e1c4fa8648b7) Conflicts: docs/sources/reference/api/docker_remote_api.md docs/sources/reference/api/docker_remote_api_v1.14.md Docker-DCO-1.1-Signed-off-by: Julien Bordellier (github: SvenDowideit) --- .../reference/api/docker_remote_api_v1.0.md | 7 +++++++ .../reference/api/docker_remote_api_v1.1.md | 7 +++++++ .../reference/api/docker_remote_api_v1.10.md | 7 +++++++ .../reference/api/docker_remote_api_v1.12.md | 23 ---------------------- .../reference/api/docker_remote_api_v1.13.md | 23 ---------------------- .../reference/api/docker_remote_api_v1.2.md | 7 +++++++ .../reference/api/docker_remote_api_v1.3.md | 7 +++++++ .../reference/api/docker_remote_api_v1.4.md | 7 +++++++ .../reference/api/docker_remote_api_v1.5.md | 7 +++++++ .../reference/api/docker_remote_api_v1.6.md | 7 +++++++ .../reference/api/docker_remote_api_v1.7.md | 7 +++++++ .../reference/api/docker_remote_api_v1.8.md | 7 +++++++ .../reference/api/docker_remote_api_v1.9.md | 7 +++++++ 13 files changed, 77 insertions(+), 46 deletions(-) diff --git a/docs/sources/reference/api/docker_remote_api_v1.0.md b/docs/sources/reference/api/docker_remote_api_v1.0.md index b906298b85..9873785f32 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.0.md +++ b/docs/sources/reference/api/docker_remote_api_v1.0.md @@ -566,6 +566,13 @@ Insert a file from `url` in the image `name` at `path` {{ STREAM }} + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.1.md b/docs/sources/reference/api/docker_remote_api_v1.1.md index 4e449bccec..fa2f878d14 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.1.md +++ b/docs/sources/reference/api/docker_remote_api_v1.1.md @@ -573,6 +573,13 @@ Insert a file from `url` in the image `name` at `path` {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.10.md b/docs/sources/reference/api/docker_remote_api_v1.10.md index 264cdefc20..88674bfcc5 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.10.md +++ b/docs/sources/reference/api/docker_remote_api_v1.10.md @@ -739,6 +739,13 @@ Insert a file from `url` in the image {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.12.md b/docs/sources/reference/api/docker_remote_api_v1.12.md index 19fb24fe48..3007a3e580 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.12.md +++ b/docs/sources/reference/api/docker_remote_api_v1.12.md @@ -808,30 +808,7 @@ Create an image, either by pull it from the registry or by importing it - **200** – no error - **500** – server error -### Insert a file in an image -`POST /images/(name)/insert` - -Insert a file from `url` in the image `name` at `path` - - **Example request**: - - POST /images/test/insert?path=/usr&url=myurl HTTP/1.1 - - **Example response**: - - HTTP/1.1 200 OK - Content-Type: application/json - - {"status":"Inserting..."} - {"status":"Inserting", "progress":"1/? (n/a)", "progressDetail":{"current":1}} - {"error":"Invalid..."} - ... - - Status Codes: - - - **200** – no error - - **500** – server error ### Inspect an image diff --git a/docs/sources/reference/api/docker_remote_api_v1.13.md b/docs/sources/reference/api/docker_remote_api_v1.13.md index e0ad957941..9fefc51c4a 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.13.md +++ b/docs/sources/reference/api/docker_remote_api_v1.13.md @@ -808,30 +808,7 @@ Create an image, either by pull it from the registry or by importing it - **200** – no error - **500** – server error -### Insert a file in an image -`POST /images/(name)/insert` - -Insert a file from `url` in the image `name` at `path` - - **Example request**: - - POST /images/test/insert?path=/usr&url=myurl HTTP/1.1 - - **Example response**: - - HTTP/1.1 200 OK - Content-Type: application/json - - {"status":"Inserting..."} - {"status":"Inserting", "progress":"1/? (n/a)", "progressDetail":{"current":1}} - {"error":"Invalid..."} - ... - - Status Codes: - - - **200** – no error - - **500** – server error ### Inspect an image diff --git a/docs/sources/reference/api/docker_remote_api_v1.2.md b/docs/sources/reference/api/docker_remote_api_v1.2.md index 37a8e1c012..b8d7dfbc99 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.2.md +++ b/docs/sources/reference/api/docker_remote_api_v1.2.md @@ -589,6 +589,13 @@ Insert a file from `url` in the image `name` at `path` {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.3.md b/docs/sources/reference/api/docker_remote_api_v1.3.md index b510f660fd..c65e7faae1 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.3.md +++ b/docs/sources/reference/api/docker_remote_api_v1.3.md @@ -639,6 +639,13 @@ Insert a file from `url` in the image `name` at `path` {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.4.md b/docs/sources/reference/api/docker_remote_api_v1.4.md index 0e49402621..0c8b9b32bb 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.4.md +++ b/docs/sources/reference/api/docker_remote_api_v1.4.md @@ -685,6 +685,13 @@ Insert a file from `url` in the image `name` at `path` {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.5.md b/docs/sources/reference/api/docker_remote_api_v1.5.md index 33c1aeca1e..0ee7251f1b 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.5.md +++ b/docs/sources/reference/api/docker_remote_api_v1.5.md @@ -686,6 +686,13 @@ Insert a file from `url` in the image `name` at `path` {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.6.md b/docs/sources/reference/api/docker_remote_api_v1.6.md index 4500c1554c..8e969f85fa 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.6.md +++ b/docs/sources/reference/api/docker_remote_api_v1.6.md @@ -793,6 +793,13 @@ Insert a file from `url` in the image `name` at `path` {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.7.md b/docs/sources/reference/api/docker_remote_api_v1.7.md index 402efa4262..4efa1c7bc9 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.7.md +++ b/docs/sources/reference/api/docker_remote_api_v1.7.md @@ -712,6 +712,13 @@ Insert a file from `url` in the image `name` at `path` {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.8.md b/docs/sources/reference/api/docker_remote_api_v1.8.md index 78fccaf281..b8117b5138 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.8.md +++ b/docs/sources/reference/api/docker_remote_api_v1.8.md @@ -754,6 +754,13 @@ Insert a file from `url` in the image `name` at `path` {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.9.md b/docs/sources/reference/api/docker_remote_api_v1.9.md index 741a9ac955..92068120ef 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.9.md +++ b/docs/sources/reference/api/docker_remote_api_v1.9.md @@ -758,6 +758,13 @@ Insert a file from `url` in the image `name` at `path` {"error":"Invalid..."} ... + Query Parameters: + + + + - **url** – The url from where the file is taken + - **path** – The path where the file is stored + Status Codes: - **200** – no error -- cgit v1.2.1 From 5ed854f2895ba20b929ae94732ef24957b280e29 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 7 Jul 2014 09:28:03 -0500 Subject: Updating to reflect changes in the SoftLayer portal and product naming conventions. Docker-DCO-1.1-Signed-off-by: Phil Jackson (github: underscorephil) (cherry picked from commit f1e072c8d5266b9c4b320458bffcd87254b36c55) Docker-DCO-1.1-Signed-off-by: Phil (github: SvenDowideit) --- docs/sources/installation/softlayer.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/sources/installation/softlayer.md b/docs/sources/installation/softlayer.md index d01866720c..d594896a92 100644 --- a/docs/sources/installation/softlayer.md +++ b/docs/sources/installation/softlayer.md @@ -6,22 +6,22 @@ page_keywords: IBM SoftLayer, virtualization, cloud, docker, documentation, inst 1. Create an [IBM SoftLayer account]( https://www.softlayer.com/cloud-servers/). -2. Log in to the [SoftLayer Console]( - https://control.softlayer.com/devices/). -3. Go to [Order Hourly Computing Instance Wizard]( - https://manage.softlayer.com/Sales/orderHourlyComputingInstance) - on your SoftLayer Console. -4. Create a new *CloudLayer Computing Instance* (CCI) using the default +2. Log in to the [SoftLayer Customer Portal]( + https://control.softlayer.com/). +3. From the *Devices* menu select [*Device List*](https://control.softlayer.com/devices) +4. Click *Order Devices* on the top right of the window below the menu bar. +5. Under *Virtual Server* click [*Hourly*](https://manage.softlayer.com/Sales/orderHourlyComputingInstance) +6. Create a new *SoftLayer Virtual Server Instance* (VSI) using the default values for all the fields and choose: - - *First Available* as `Datacenter` and + - The desired location for *Datacenter* - *Ubuntu Linux 12.04 LTS Precise Pangolin - Minimal Install (64 bit)* - as `Operating System`. + for *Operating System*. -5. Click the *Continue Your Order* button at the bottom right and - select *Go to checkout*. -6. Insert the required *User Metadata* and place the order. -7. Then continue with the [*Ubuntu*](../ubuntulinux/#ubuntu-linux) +7. Click the *Continue Your Order* button at the bottom right. +8. Fill out VSI *hostname* and *domain*. +9. Insert the required *User Metadata* and place the order. +10. Then continue with the [*Ubuntu*](../ubuntulinux/#ubuntu-linux) instructions. ## What next? -- cgit v1.2.1 From 2f37a629d4011b0eac4709c62257147218ae5cbf Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Wed, 30 Jul 2014 11:15:18 -0400 Subject: Replace old index image with hub Docker-DCO-1.1-Signed-off-by: Brian Goff (github: cpuguy83) (cherry picked from commit ba57d3d9e63445f43e4d53da44e8dec27baa288d) Docker-DCO-1.1-Signed-off-by: Brian Goff (github: SvenDowideit) --- docs/sources/userguide/search.png | Bin 101216 -> 72860 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/sources/userguide/search.png b/docs/sources/userguide/search.png index 27370741a7..ded0d0d2d3 100644 Binary files a/docs/sources/userguide/search.png and b/docs/sources/userguide/search.png differ -- cgit v1.2.1 From 9d1e89f4a00f3028eff28b0e9f20969fcfc16f99 Mon Sep 17 00:00:00 2001 From: Roberto Gandolfo Hashioka Date: Wed, 30 Jul 2014 15:32:14 -0700 Subject: Added GA universal analytics support Docker-DCO-1.1-Signed-off-by: Roberto Hashioka (github: rogaha) (cherry picked from commit e13b1fc05f5caaa324678b7da2fc917943557185) Docker-DCO-1.1-Signed-off-by: Roberto Gandolfo Hashioka (github: SvenDowideit) --- docs/theme/mkdocs/base.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/theme/mkdocs/base.html b/docs/theme/mkdocs/base.html index 2b2b9bcbcf..ae077ccbaf 100644 --- a/docs/theme/mkdocs/base.html +++ b/docs/theme/mkdocs/base.html @@ -28,15 +28,15 @@ {% if config.google_analytics %} {% endif %} -- cgit v1.2.1 From 04d1d7eac24ceb5db521379b98c2de8ad9253f30 Mon Sep 17 00:00:00 2001 From: hollietealok Date: Wed, 23 Jul 2014 11:55:56 -0700 Subject: Removed docker_io_oauth_api.md: Docker is not currently accepting registrations for third party auth while it's determined how this will be done, if at all, in the future. Docker-DCO-1.1-Signed-off-by: hollietealok (github: hollietealok) (cherry picked from commit 9fbae5924471b63e4f33fbd87f797183ab68be92) Docker-DCO-1.1-Signed-off-by: hollietealok (github: SvenDowideit) --- docs/sources/reference/api/docker_io_oauth_api.md | 254 ---------------------- 1 file changed, 254 deletions(-) delete mode 100644 docs/sources/reference/api/docker_io_oauth_api.md diff --git a/docs/sources/reference/api/docker_io_oauth_api.md b/docs/sources/reference/api/docker_io_oauth_api.md deleted file mode 100644 index c5d07720b8..0000000000 --- a/docs/sources/reference/api/docker_io_oauth_api.md +++ /dev/null @@ -1,254 +0,0 @@ -page_title: docker.io OAuth API -page_description: API Documentation for docker.io's OAuth flow. -page_keywords: API, Docker, oauth, REST, documentation - -# docker.io OAuth API - -## 1. Brief introduction - -Some docker.io API requests will require an access token to -authenticate. To get an access token for a user, that user must first -grant your application access to their docker.io account. In order for -them to grant your application access you must first register your -application. - -Before continuing, we encourage you to familiarize yourself with [The -OAuth 2.0 Authorization Framework](http://tools.ietf.org/html/rfc6749). - -*Also note that all OAuth interactions must take place over https -connections* - -## 2. Register Your Application - -You will need to register your application with docker.io before users -will be able to grant your application access to their account -information. We are currently only allowing applications selectively. To -request registration of your application send an email to -[support-accounts@docker.com](mailto:support-accounts%40docker.com) with -the following information: - - - The name of your application - - A description of your application and the service it will provide to - docker.io users. - - A callback URI that we will use for redirecting authorization - requests to your application. These are used in the step of getting - an Authorization Code. The domain name of the callback URI will be - visible to the user when they are requested to authorize your - application. - -When your application is approved you will receive a response from the -docker.io team with your `client_id` and -`client_secret` which your application will use in -the steps of getting an Authorization Code and getting an Access Token. - -# 3. Endpoints - -## 3.1 Get an Authorization Code - -Once You have registered you are ready to start integrating docker.io -accounts into your application! The process is usually started by a user -following a link in your application to an OAuth Authorization endpoint. - -`GET /api/v1.1/o/authorize/` - -Request that a docker.io user authorize your application. If the -user is not already logged in, they will be prompted to login. The -user is then presented with a form to authorize your application for -the requested access scope. On submission, the user will be -redirected to the specified `redirect_uri` with -an Authorization Code. - - Query Parameters: - -   - - - **client_id** – The `client_id` given to - your application at registration. - - **response_type** – MUST be set to `code`. - This specifies that you would like an Authorization Code - returned. - - **redirect_uri** – The URI to redirect back to after the user - has authorized your application. If omitted, the first of your - registered `response_uris` is used. If - included, it must be one of the URIs which were submitted when - registering your application. - - **scope** – The extent of access permissions you are requesting. - Currently, the scope options are `profile_read`, `profile_write`, - `email_read`, and `email_write`. Scopes must be separated by a space. If omitted, the - default scopes `profile_read email_read` are - used. - - **state** – (Recommended) Used by your application to maintain - state between the authorization request and callback to protect - against CSRF attacks. - - **Example Request** - - Asking the user for authorization. - - GET /api/v1.1/o/authorize/?client_id=TestClientID&response_type=code&redirect_uri=https%3A//my.app/auth_complete/&scope=profile_read%20email_read&state=abc123 HTTP/1.1 - Host: www.docker.io - - **Authorization Page** - - When the user follows a link, making the above GET request, they - will be asked to login to their docker.io account if they are not - already and then be presented with the following authorization - prompt which asks the user to authorize your application with a - description of the requested scopes. - - ![](/reference/api/_static/io_oauth_authorization_page.png) - - Once the user allows or denies your Authorization Request the user - will be redirected back to your application. Included in that - request will be the following query parameters: - - `code` - : The Authorization code generated by the docker.io authorization - server. Present it again to request an Access Token. This code - expires in 60 seconds. - `state` - : If the `state` parameter was present in the - authorization request this will be the exact value received from - that request. - `error` - : An error message in the event of the user denying the - authorization or some other kind of error with the request. - -## 3.2 Get an Access Token - -Once the user has authorized your application, a request will be made to -your application's specified `redirect_uri` which -includes a `code` parameter that you must then use -to get an Access Token. - -`POST /api/v1.1/o/token/` - -Submit your newly granted Authorization Code and your application's -credentials to receive an Access Token and Refresh Token. The code -is valid for 60 seconds and cannot be used more than once. - - Request Headers: - -   - - - **Authorization** – HTTP basic authentication using your - application's `client_id` and - `client_secret` - - Form Parameters: - -   - - - **grant_type** – MUST be set to `authorization_code` - - **code** – The authorization code received from the user's - redirect request. - - **redirect_uri** – The same `redirect_uri` - used in the authentication request. - - **Example Request** - - Using an authorization code to get an access token. - - POST /api/v1.1/o/token/ HTTP/1.1 - Host: www.docker.io - Authorization: Basic VGVzdENsaWVudElEOlRlc3RDbGllbnRTZWNyZXQ= - Accept: application/json - Content-Type: application/json - - { - "grant_type": "code", - "code": "YXV0aG9yaXphdGlvbl9jb2Rl", - "redirect_uri": "https://my.app/auth_complete/" - } - - **Example Response** - - HTTP/1.1 200 OK - Content-Type: application/json;charset=UTF-8 - - { - "username": "janedoe", - "user_id": 42, - "access_token": "t6k2BqgRw59hphQBsbBoPPWLqu6FmS", - "expires_in": 15552000, - "token_type": "Bearer", - "scope": "profile_read email_read", - "refresh_token": "hJDhLH3cfsUrQlT4MxA6s8xAFEqdgc" - } - - In the case of an error, there will be a non-200 HTTP Status and and - data detailing the error. - -## 3.3 Refresh a Token - -Once the Access Token expires you can use your `refresh_token` -to have docker.io issue your application a new Access Token, -if the user has not revoked access from your application. - -`POST /api/v1.1/o/token/` - -Submit your `refresh_token` and application's -credentials to receive a new Access Token and Refresh Token. The -`refresh_token` can be used only once. - - Request Headers: - -   - - - **Authorization** – HTTP basic authentication using your - application's `client_id` and - `client_secret` - - Form Parameters: - -   - - - **grant_type** – MUST be set to `refresh_token` - - **refresh_token** – The `refresh_token` - which was issued to your application. - - **scope** – (optional) The scope of the access token to be - returned. Must not include any scope not originally granted by - the user and if omitted is treated as equal to the scope - originally granted. - - **Example Request** - - Refreshing an access token. - - POST /api/v1.1/o/token/ HTTP/1.1 - Host: www.docker.io - Authorization: Basic VGVzdENsaWVudElEOlRlc3RDbGllbnRTZWNyZXQ= - Accept: application/json - Content-Type: application/json - - { - "grant_type": "refresh_token", - "refresh_token": "hJDhLH3cfsUrQlT4MxA6s8xAFEqdgc", - } - - **Example Response** - - HTTP/1.1 200 OK - Content-Type: application/json;charset=UTF-8 - - { - "username": "janedoe", - "user_id": 42, - "access_token": "t6k2BqgRw59hphQBsbBoPPWLqu6FmS", - "expires_in": 15552000, - "token_type": "Bearer", - "scope": "profile_read email_read", - "refresh_token": "hJDhLH3cfsUrQlT4MxA6s8xAFEqdgc" - } - - In the case of an error, there will be a non-200 HTTP Status and and - data detailing the error. - -# 4. Use an Access Token with the API - -Many of the docker.io API requests will require a Authorization request -header field. Simply ensure you add this header with "Bearer <`access_token`>": - - GET /api/v1.1/resource HTTP/1.1 - Host: docker.io - Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA -- cgit v1.2.1 From 6ce675758e9ecb8805bb924c3f8cdd565d023a91 Mon Sep 17 00:00:00 2001 From: hollietealok Date: Tue, 29 Jul 2014 13:56:19 -0700 Subject: Removed OAuth doc from mkdocs.yml Docker-DCO-1.1-Signed-off-by: hollietealok (github: hollietealok) (cherry picked from commit 2b9d8248d6136645d3801693370e23d752f748f2) Docker-DCO-1.1-Signed-off-by: hollietealok (github: SvenDowideit) --- docs/mkdocs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index f4ebcb68fe..c21002fe13 100755 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -119,7 +119,6 @@ pages: - ['reference/api/docker_remote_api_v1.1.md', '**HIDDEN**'] - ['reference/api/docker_remote_api_v1.0.md', '**HIDDEN**'] - ['reference/api/remote_api_client_libraries.md', 'Reference', 'Docker Remote API Client Libraries'] -- ['reference/api/docker_io_oauth_api.md', 'Reference', 'Docker Hub OAuth API'] - ['reference/api/docker_io_accounts_api.md', 'Reference', 'Docker Hub Accounts API'] - ['jsearch.md', '**HIDDEN**'] -- cgit v1.2.1 From 02612d084f5d52e8d960e46fad8215f4a200479e Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Wed, 30 Jul 2014 22:47:49 -0700 Subject: docs/google: bump container-vm image version Docker-DCO-1.1-Signed-off-by: Johan Euphrosine (github: proppy) (cherry picked from commit 294f33b37a2d029164728534e781bc118d6689c2) Docker-DCO-1.1-Signed-off-by: Johan Euphrosine (github: SvenDowideit) --- docs/sources/installation/google.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/installation/google.md b/docs/sources/installation/google.md index fa2fa61fc9..23a9bfbfb8 100644 --- a/docs/sources/installation/google.md +++ b/docs/sources/installation/google.md @@ -20,7 +20,7 @@ page_keywords: Docker, Docker documentation, installation, google, Google Comput (select a zone close to you and the desired instance size) $ gcloud compute instances create docker-playground \ - --image container-vm-v20140710 \ + --image container-vm-v20140730 \ --image-project google-containers \ --zone us-central1-a \ --machine-type f1-micro -- cgit v1.2.1 From 243be8e5127baea104b55cbda399c857994bbe35 Mon Sep 17 00:00:00 2001 From: "O.S. Tezer" Date: Wed, 30 Jul 2014 17:58:24 +0300 Subject: Docs: articles/https minor amendments and update This commit proposes some minor amendments and updates for the articles/https.md document to fix certain errors, inc.: - Marking commands / flags as code (e.g. `tlsverify`) [done before rebase] - Capitalising the word Docker - Normalizing headers to match the rest of the docs; - Expanding the page description to match the page title and the content; - Capitalizing HTTPS etc.; - Some spelling error fixes; - Line-length adjustments to make it easier to read the raw file. It does not propose any fundemental changes to the structure of the document. Certain changes were based before another update on this doc. Docker-DCO-1.1-Signed-off-by: O.S. Tezer (github: ostezer) (cherry picked from commit 711fb3e19d4caf7f084d8d1eaca85cfbaef6e978) Conflicts: docs/sources/articles/https.md Docker-DCO-1.1-Signed-off-by: O.S. Tezer (github: SvenDowideit) --- docs/sources/articles/https.md | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/docs/sources/articles/https.md b/docs/sources/articles/https.md index 81570105e6..6972840652 100644 --- a/docs/sources/articles/https.md +++ b/docs/sources/articles/https.md @@ -1,6 +1,6 @@ -page_title: Docker HTTPS Setup -page_description: How to setup docker with https -page_keywords: docker, example, https, daemon +page_title: Running Docker with HTTPS +page_description: How to setup and run Docker with HTTPS +page_keywords: docker, docs, article, example, https, daemon, tls, ca, certificate # Running Docker with https @@ -11,9 +11,9 @@ If you need Docker reachable via the network in a safe manner, you can enable TLS by specifying the tlsverify flag and pointing Docker's tlscacert flag to a trusted CA certificate. -In daemon mode, it will only allow connections from clients -authenticated by a certificate signed by that CA. In client mode, it -will only connect to servers with a certificate signed by that CA. +In the daemon mode, it will only allow connections from clients +authenticated by a certificate signed by that CA. In the client mode, +it will only connect to servers with a certificate signed by that CA. > **Warning**: > Using TLS and managing a CA is an advanced topic. Please make you self @@ -83,25 +83,24 @@ need to provide your client keys, certificates and trusted CA: > Docker over TLS should run on TCP port 2376. > **Warning**: -> As shown in the example above, you don't have to run the -> `docker` client with `sudo` or -> the `docker` group when you use certificate -> authentication. That means anyone with the keys can give any -> instructions to your Docker daemon, giving them root access to the -> machine hosting the daemon. Guard these keys as you would a root -> password! +> As shown in the example above, you don't have to run the `docker` client +> with `sudo` or the `docker` group when you use certificate authentication. +> That means anyone with the keys can give any instructions to your Docker +> daemon, giving them root access to the machine hosting the daemon. Guard +> these keys as you would a root password! -## Secure By Default +## Secure by default -If you want to secure your Docker client connections by default, you can move the files -to the `.docker` directory in your home directory. Set the `DOCKER_HOST` variable as well. +If you want to secure your Docker client connections by default, you can move +the files to the `.docker` directory in your home directory - and set the +`DOCKER_HOST` variable as well. $ cp ca.pem ~/.docker/ca.pem $ cp client-cert.pem ~/.docker/cert.pem $ cp client-key.pem ~/.docker/key.pem $ export DOCKER_HOST=tcp://:2376 -Then you can just run docker with the `--tlsverify` option. +Then you can just run Docker with the `--tlsverify` option. $ docker --tlsverify ps @@ -124,5 +123,10 @@ Docker in various other modes by mixing the flags. - tlsverify, tlscacert, tlscert, tlskey: Authenticate with client certificate, authenticate server based on given CA -The client will send its client certificate if found, so you just need -to drop your keys into ~/.docker/.pem +If found, the client will send its client certificate, so you just need +to drop your keys into `~/.docker/.pem`. Alternatively, +if you want to store your keys in another location, you can specify that +location using the environment variable `DOCKER_CONFIG`. + + $ export DOCKER_CONFIG=${HOME}/.dockers/zone1/ + $ docker --tlsverify ps -- cgit v1.2.1 From 046134c0b911806ab1930a36a949d014e5930664 Mon Sep 17 00:00:00 2001 From: Fred Lifton Date: Fri, 25 Jul 2014 16:22:41 -0700 Subject: First pass at replacing parent-child metaphor to describe docker links. Addresses issue #7141 Docker-DCO-1.1-Signed-off-by: Fred Lifton (github: fredlf) a little git by Docker-DCO-1.1-Signed-off-by: Fred Lifton (github: SvenDowideit) (cherry picked from commit 631ea726e425713415e7a991f9a813d02b3f6d75) --- docs/sources/userguide/dockerlinks.md | 171 +++++++++++++++++----------------- 1 file changed, 87 insertions(+), 84 deletions(-) diff --git a/docs/sources/userguide/dockerlinks.md b/docs/sources/userguide/dockerlinks.md index c1d8c14681..3624bf72c3 100644 --- a/docs/sources/userguide/dockerlinks.md +++ b/docs/sources/userguide/dockerlinks.md @@ -4,48 +4,47 @@ page_keywords: Examples, Usage, user guide, links, linking, docker, documentatio # Linking Containers Together -In [the Using Docker section](/userguide/usingdocker) we touched on -connecting to a service running inside a Docker container via a network -port. This is one of the ways that you can interact with services and -applications running inside Docker containers. In this section we're -going to give you a refresher on connecting to a Docker container via a -network port as well as introduce you to the concepts of container -linking. +In [the Using Docker section](/userguide/usingdocker), you saw how you can +connect to a service running inside a Docker container via a network +port. But a port connection is only one way you can interact with services and +applications running inside Docker containers. In this section, we'll briefly revisit +connecting via a network port and then we'll introduce you to another method of access: +container linking. ## Network port mapping refresher -In [the Using Docker section](/userguide/usingdocker) we created a -container that ran a Python Flask application. +In [the Using Docker section](/userguide/usingdocker), you created a +container that ran a Python Flask application: $ sudo docker run -d -P training/webapp python app.py > **Note:** > Containers have an internal network and an IP address -> (remember we used the `docker inspect` command to show the container's +> (as we saw when we used the `docker inspect` command to show the container's > IP address in the [Using Docker](/userguide/usingdocker/) section). > Docker can have a variety of network configurations. You can see more > information on Docker networking [here](/articles/networking/). -When we created that container we used the `-P` flag to automatically map any -network ports inside that container to a random high port from the range 49000 -to 49900 on our Docker host. When we subsequently ran `docker ps` we saw that -port 5000 was bound to port 49155. +When that container was created, the `-P` flag was used to automatically map any +network ports inside it to a random high port from the range 49000 +to 49900 on our Docker host. Next, when `docker ps` was run, you saw that +port 5000 in the container was bound to port 49155 on the host. $ sudo docker ps nostalgic_morse CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES bc533791f3f5 training/webapp:latest python app.py 5 seconds ago Up 2 seconds 0.0.0.0:49155->5000/tcp nostalgic_morse -We also saw how we can bind a container's ports to a specific port using -the `-p` flag. +You also saw how you can bind a container's ports to a specific port using +the `-p` flag: $ sudo docker run -d -p 5000:5000 training/webapp python app.py -And we saw why this isn't such a great idea because it constrains us to +And you saw why this isn't such a great idea because it constrains you to only one container on that specific port. -There are also a few other ways we can configure the `-p` flag. By +There are also a few other ways you can configure the `-p` flag. By default the `-p` flag will bind the specified port to all interfaces on -the host machine. But we can also specify a binding to a specific +the host machine. But you can also specify a binding to a specific interface, for example only to the `localhost`. $ sudo docker run -d -p 127.0.0.1:5000:5000 training/webapp python app.py @@ -53,20 +52,19 @@ interface, for example only to the `localhost`. This would bind port 5000 inside the container to port 5000 on the `localhost` or `127.0.0.1` interface on the host machine. -Or to bind port 5000 of the container to a dynamic port but only on the -`localhost` we could: +Or, to bind port 5000 of the container to a dynamic port but only on the +`localhost`, you could use: $ sudo docker run -d -p 127.0.0.1::5000 training/webapp python app.py -We can also bind UDP ports by adding a trailing `/udp`, for example: +You can also bind UDP ports by adding a trailing `/udp`. For example: $ sudo docker run -d -p 127.0.0.1:5000:5000/udp training/webapp python app.py -We also saw the useful `docker port` shortcut which showed us the -current port bindings, this is also useful for showing us specific port -configurations. For example if we've bound the container port to the -`localhost` on the host machine this will be shown in the `docker port` -output. +You also learned about the useful `docker port` shortcut which showed us the +current port bindings. This is also useful for showing you specific port +configurations. For example, if you've bound the container port to the +`localhost` on the host machine, then the `docker port` output will reflect that. $ docker port nostalgic_morse 5000 127.0.0.1:49155 @@ -78,38 +76,39 @@ output. Network port mappings are not the only way Docker containers can connect to one another. Docker also has a linking system that allows you to link -multiple containers together and share connection information between -them. Docker linking will create a parent child relationship where the -parent container can see selected information about its child. +multiple containers together and send connection information from one to another. +When containers are linked, information about a source container can be sent to a +recipient container. This allows the recipient to see selected data describing +aspects of the source container. ## Container naming -To perform this linking Docker relies on the names of your containers. -We've already seen that each container we create has an automatically -created name, indeed we've become familiar with our old friend +To establish links, Docker relies on the names of your containers. +You've already seen that each container you create has an automatically +created name; indeed you've become familiar with our old friend `nostalgic_morse` during this guide. You can also name containers yourself. This naming provides two useful functions: -1. It's useful to name containers that do specific functions in a way +1. It can be useful to name containers that do specific functions in a way that makes it easier for you to remember them, for example naming a - container with a web application in it `web`. + container containing a web application `web`. 2. It provides Docker with a reference point that allows it to refer to other - containers, for example link container `web` to container `db`. + containers, for example, you can specify to link the container `web` to container `db`. You can name your container by using the `--name` flag, for example: $ sudo docker run -d -P --name web training/webapp python app.py -You can see we've launched a new container and used the `--name` flag to -call the container `web`. We can see the container's name using the +This launches a new container and uses the `--name` flag to +name the container `web`. You can see the container's name using the `docker ps` command. $ sudo docker ps -l CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES aed84ee21bde training/webapp:latest python app.py 12 hours ago Up 2 seconds 0.0.0.0:49154->5000/tcp web -We can also use `docker inspect` to return the container's name. +You can also use `docker inspect` to return the container's name. $ sudo docker inspect -f "{{ .Name }}" aed84ee21bde /web @@ -117,67 +116,70 @@ We can also use `docker inspect` to return the container's name. > **Note:** > Container names have to be unique. That means you can only call > one container `web`. If you want to re-use a container name you must delete -> the old container with the `docker rm` command before you can create a new +> the old container (with `docker rm`) before you can create a new > container with the same name. As an alternative you can use the `--rm` > flag with the `docker run` command. This will delete the container -> immediately after it stops. +> immediately after it is stopped. ## Container Linking -Links allow containers to discover and securely communicate with each -other. To create a link you use the `--link` flag. Let's create a new -container, this one a database. +Links allow containers to discover each other and securely transfer information about one +container to another container. When you set up a link, you create a conduit between a +source container and a recipient container. The recipient can then access select data +about the source. To create a link, you use the `--link` flag. First, create a new +container, this time one containing a database. $ sudo docker run -d --name db training/postgres -Here we've created a new container called `db` using the `training/postgres` +This creates a new container called `db` from the `training/postgres` image, which contains a PostgreSQL database. -We need to delete the `web` container we created previously so we can replace it +Now, you need to delete the `web` container you created previously so you can replace it with a linked one: $ docker rm -f web -Now let's create a new `web` container and link it with our `db` container. +Now, create a new `web` container and link it with your `db` container. $ sudo docker run -d -P --name web --link db:db training/webapp python app.py -This will link the new `web` container with the `db` container we created +This will link the new `web` container with the `db` container you created earlier. The `--link` flag takes the form: --link name:alias Where `name` is the name of the container we're linking to and `alias` is an -alias for the link name. We'll see how that alias gets used shortly. +alias for the link name. You'll see how that alias gets used shortly. -Let's look at our linked containers using `docker ps`. +Next, look at your linked containers using `docker ps`. $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 349169744e49 training/postgres:latest su postgres -c '/usr About a minute ago Up About a minute 5432/tcp db, web/db aed84ee21bde training/webapp:latest python app.py 16 hours ago Up 2 minutes 0.0.0.0:49154->5000/tcp web -We can see our named containers, `db` and `web`, and we can see that the `db` -containers also shows `web/db` in the `NAMES` column. This tells us that the -`web` container is linked to the `db` container in a parent/child relationship. +You can see your named containers, `db` and `web`, and you can see that the `db` +container also shows `web/db` in the `NAMES` column. This tells you that the +`web` container is linked to the `db` container, which allows it to access information +about the `db` container. -So what does linking the containers do? Well we've discovered the link creates -a parent-child relationship between the two containers. The child container, -here `web`, can access information on the parent container `db`. To do this -Docker creates a secure tunnel between the containers without the need to -expose any ports externally on the container. You'll note when we started the -`db` container we did not use either of the `-P` or `-p` flags. As we're -linking the containers we don't need to expose the PostgreSQL database via the -network. +So what does linking the containers actually do? You've learned that a link creates a +source container that can provide information about itself to a recipient container. In +our example, the recipient, `web`, can access information about the source `db`. To do +this, Docker creates a secure tunnel between the containers that doesn't need to +expose any ports externally on the container; you'll note when we started the +`db` container we did not use either the `-P` or `-p` flags. That's a big benefit of +linking: we don't need to expose the source container, here the PostgreSQL database, to +the network. -Docker exposes connectivity information for the parent container inside the -child container in two ways: +Docker exposes connectivity information for the source container to the +recipient container in two ways: * Environment variables, * Updating the `/etc/hosts` file. -Let's look first at the environment variables Docker sets. Let's run the `env` -command to list the container's environment variables. +Docker can set a number of environment variables. You run the `env` +command to list the specified container's environment variables. ``` $ sudo docker run --rm --name web2 --link db:db training/webapp env @@ -196,17 +198,17 @@ command to list the container's environment variables. > container. Similarly, some daemons (such as `sshd`) > will scrub them when spawning shells for connection. -We can see that Docker has created a series of environment variables with -useful information about our `db` container. Each variable is prefixed with -`DB_` which is populated from the `alias` we specified above. If our `alias` -were `db1` the variables would be prefixed with `DB1_`. You can use these +You can see that Docker has created a series of environment variables with +useful information about the source `db` container. Each variable is prefixed with +`DB_`, which is populated from the `alias` you specified above. If the `alias` +were `db1`, the variables would be prefixed with `DB1_`. You can use these environment variables to configure your applications to connect to the database -on the `db` container. The connection will be secure, private and only the +on the `db` container. The connection will be secure and private; only the linked `web` container will be able to talk to the `db` container. -In addition to the environment variables Docker adds a host entry for the -linked parent to the `/etc/hosts` file. Let's look at this file on the `web` -container now. +In addition to the environment variables, Docker adds a host entry for the +source container to the `/etc/hosts` file. Here's an entry for the `web` +container: $ sudo docker run -t -i --rm --link db:db training/webapp /bin/bash root@aed84ee21bde:/opt/webapp# cat /etc/hosts @@ -214,9 +216,9 @@ container now. . . . 172.17.0.5 db -We can see two relevant host entries. The first is an entry for the `web` +You can see two relevant host entries. The first is an entry for the `web` container that uses the Container ID as a host name. The second entry uses the -link alias to reference the IP address of the `db` container. Let's try to ping +link alias to reference the IP address of the `db` container. You can ping that host now via this host name. root@aed84ee21bde:/opt/webapp# apt-get install -yqq inetutils-ping @@ -227,21 +229,22 @@ that host now via this host name. 56 bytes from 172.17.0.5: icmp_seq=2 ttl=64 time=0.256 ms > **Note:** -> We had to install `ping` because our container didn't have it. +> In the example, you'll note you had to install `ping` because it was not included +> in the container initially. -We've used the `ping` command to ping the `db` container using it's host entry -which resolves to `172.17.0.5`. We can make use of this host entry to configure -an application to make use of our `db` container. +Here, you used the `ping` command to ping the `db` container using its host entry, +which resolves to `172.17.0.5`. You can use this host entry to configure an application +to make use of your `db` container. > **Note:** -> You can link multiple child containers to a single parent. For -> example, we could have multiple web containers attached to our `db` -> container. +> You can link multiple recipient containers to a single source. For +> example, you could have multiple (differently named) web containers attached to your +>`db` container. # Next step -Now we know how to link Docker containers together the next step is -learning how to manage data, volumes and mounts inside our containers. +Now that you know how to link Docker containers together, the next step is +learning how to manage data, volumes and mounts inside your containers. Go to [Managing Data in Containers](/userguide/dockervolumes). -- cgit v1.2.1 From 6861223d5bd96e1f4165eeaf937f2f465fe34de9 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 7 Jul 2014 12:06:34 -0600 Subject: Standardize "apt-get install" usage across the repo I might have missed some, but I think this is most of the offenders. Docker-DCO-1.1-Signed-off-by: Andrew Page (github: tianon) (cherry picked from commit fc637b5275c2fe23c9857a34316a783042d906b8) Conflicts: docs/sources/examples/running_riak_service.md Docker-DCO-1.1-Signed-off-by: Tianon Gravi (github: SvenDowideit) --- Dockerfile | 3 +- README.md | 3 +- contrib/desktop-integration/iceweasel/Dockerfile | 2 +- docs/Dockerfile | 2 +- .../articles/cfengine_process_management.md | 7 +- docs/sources/articles/using_supervisord.md | 9 +- docs/sources/examples/apt-cacher-ng.Dockerfile | 4 +- docs/sources/examples/apt-cacher-ng.md | 6 +- docs/sources/examples/mongodb.md | 5 +- docs/sources/examples/mongodb/Dockerfile | 7 +- .../sources/examples/postgresql_service.Dockerfile | 8 +- docs/sources/examples/postgresql_service.md | 8 +- docs/sources/examples/running_redis_service.md | 9 +- docs/sources/examples/running_riak_service.md | 20 +-- .../examples/running_ssh_service.Dockerfile | 5 +- docs/sources/examples/running_ssh_service.md | 5 +- docs/sources/reference/builder.md | 11 +- docs/sources/userguide/dockerimages.md | 175 ++++++++++++++++++--- hack/release.sh | 3 +- 19 files changed, 187 insertions(+), 105 deletions(-) diff --git a/Dockerfile b/Dockerfile index d2e32a4ae5..b8c4f34dc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,8 +28,7 @@ FROM ubuntu:14.04 MAINTAINER Tianon Gravi (@tianon) # Packaged dependencies -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq \ - apt-utils \ +RUN apt-get update && apt-get install -y \ aufs-tools \ automake \ btrfs-tools \ diff --git a/README.md b/README.md index 08d839c3cc..46acc5ab10 100644 --- a/README.md +++ b/README.md @@ -131,8 +131,7 @@ Here's a typical Docker build process: ```bash FROM ubuntu:12.04 -RUN apt-get update -RUN apt-get install -q -y python python-pip curl +RUN apt-get update && apt-get install -y python python-pip curl RUN curl -sSL https://github.com/shykes/helloflask/archive/master.tar.gz | tar -xzv RUN cd helloflask-master && pip install -r requirements.txt ``` diff --git a/contrib/desktop-integration/iceweasel/Dockerfile b/contrib/desktop-integration/iceweasel/Dockerfile index 80d6a55e4a..0f3e8f2527 100644 --- a/contrib/desktop-integration/iceweasel/Dockerfile +++ b/contrib/desktop-integration/iceweasel/Dockerfile @@ -29,7 +29,7 @@ FROM debian:wheezy MAINTAINER Daniel Mizyrycki # Install Iceweasel and "sudo" -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq iceweasel sudo +RUN apt-get update && apt-get install -y iceweasel sudo # create sysadmin account RUN useradd -m -d /data -p saIVpsc0EVTwA sysadmin diff --git a/docs/Dockerfile b/docs/Dockerfile index 345de92bd0..219999e4de 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie MAINTAINER Sven Dowideit (@SvenDowideit) -RUN apt-get update && apt-get install -yq make python-pip python-setuptools vim-tiny git gettext +RUN apt-get update && apt-get install -y make python-pip python-setuptools vim-tiny git gettext RUN pip install mkdocs diff --git a/docs/sources/articles/cfengine_process_management.md b/docs/sources/articles/cfengine_process_management.md index 6bb4df66ae..a9441a6d35 100644 --- a/docs/sources/articles/cfengine_process_management.md +++ b/docs/sources/articles/cfengine_process_management.md @@ -65,13 +65,12 @@ The first two steps can be done as part of a Dockerfile, as follows. FROM ubuntu MAINTAINER Eystein Måløy Stenberg - RUN apt-get -y install wget lsb-release unzip ca-certificates + RUN apt-get update && apt-get install -y wget lsb-release unzip ca-certificates # install latest CFEngine RUN wget -qO- http://cfengine.com/pub/gpg.key | apt-key add - RUN echo "deb http://cfengine.com/pub/apt $(lsb_release -cs) main" > /etc/apt/sources.list.d/cfengine-community.list - RUN apt-get update - RUN apt-get install cfengine-community + RUN apt-get update && apt-get install -y cfengine-community # install cfe-docker process management policy RUN wget https://github.com/estenberg/cfe-docker/archive/master.zip -P /tmp/ && unzip /tmp/master.zip -d /tmp/ @@ -80,7 +79,7 @@ The first two steps can be done as part of a Dockerfile, as follows. RUN rm -rf /tmp/cfe-docker-master /tmp/master.zip # apache2 and openssh are just for testing purposes, install your own apps here - RUN apt-get -y install openssh-server apache2 + RUN apt-get update && apt-get install -y openssh-server apache2 RUN mkdir -p /var/run/sshd RUN echo "root:password" | chpasswd # need a password for ssh diff --git a/docs/sources/articles/using_supervisord.md b/docs/sources/articles/using_supervisord.md index 90aefb4b94..10f32c7d1b 100644 --- a/docs/sources/articles/using_supervisord.md +++ b/docs/sources/articles/using_supervisord.md @@ -28,19 +28,14 @@ new image. FROM ubuntu:13.04 MAINTAINER examples@docker.com - RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list - RUN apt-get update - RUN apt-get upgrade -y ## Installing Supervisor We can now install our SSH and Apache daemons as well as Supervisor in our container. - RUN apt-get install -y openssh-server apache2 supervisor - RUN mkdir -p /var/lock/apache2 /var/run/apache2 - RUN mkdir -p /var/run/sshd - RUN mkdir -p /var/log/supervisor + RUN apt-get update && apt-get install -y openssh-server apache2 supervisor + RUN mkdir -p /var/lock/apache2 /var/run/apache2 /var/run/sshd /var/log/supervisor Here we're installing the `openssh-server`, `apache2` and `supervisor` diff --git a/docs/sources/examples/apt-cacher-ng.Dockerfile b/docs/sources/examples/apt-cacher-ng.Dockerfile index 3b7862bb58..d1f76572b9 100644 --- a/docs/sources/examples/apt-cacher-ng.Dockerfile +++ b/docs/sources/examples/apt-cacher-ng.Dockerfile @@ -9,7 +9,7 @@ FROM ubuntu MAINTAINER SvenDowideit@docker.com VOLUME ["/var/cache/apt-cacher-ng"] -RUN apt-get update ; apt-get install -yq apt-cacher-ng +RUN apt-get update && apt-get install -y apt-cacher-ng EXPOSE 3142 -CMD chmod 777 /var/cache/apt-cacher-ng ; /etc/init.d/apt-cacher-ng start ; tail -f /var/log/apt-cacher-ng/* +CMD chmod 777 /var/cache/apt-cacher-ng && /etc/init.d/apt-cacher-ng start && tail -f /var/log/apt-cacher-ng/* diff --git a/docs/sources/examples/apt-cacher-ng.md b/docs/sources/examples/apt-cacher-ng.md index 34e4a4bf02..7dafec1593 100644 --- a/docs/sources/examples/apt-cacher-ng.md +++ b/docs/sources/examples/apt-cacher-ng.md @@ -28,10 +28,10 @@ Use the following Dockerfile: MAINTAINER SvenDowideit@docker.com VOLUME ["/var/cache/apt-cacher-ng"] - RUN apt-get update ; apt-get install -yq apt-cacher-ng + RUN apt-get update && apt-get install -y apt-cacher-ng EXPOSE 3142 - CMD chmod 777 /var/cache/apt-cacher-ng ; /etc/init.d/apt-cacher-ng start ; tail -f /var/log/apt-cacher-ng/* + CMD chmod 777 /var/cache/apt-cacher-ng && /etc/init.d/apt-cacher-ng start && tail -f /var/log/apt-cacher-ng/* To build the image using: @@ -61,7 +61,7 @@ a local version of a common base: FROM ubuntu RUN echo 'Acquire::http { Proxy "http://dockerhost:3142"; };' >> /etc/apt/apt.conf.d/01proxy - RUN apt-get update ; apt-get install vim git + RUN apt-get update && apt-get install -y vim git # docker build -t my_ubuntu . diff --git a/docs/sources/examples/mongodb.md b/docs/sources/examples/mongodb.md index 602f55ca88..28f7824594 100644 --- a/docs/sources/examples/mongodb.md +++ b/docs/sources/examples/mongodb.md @@ -65,13 +65,12 @@ a MongoDB repository file for the package manager. After this initial preparation we can update our packages and install MongoDB. # Update apt-get sources AND install MongoDB - RUN apt-get update - RUN apt-get install -y -q mongodb-org + RUN apt-get update && apt-get install -y mongodb-org > **Tip:** You can install a specific version of MongoDB by using a list > of required packages with versions, e.g.: > -> RUN apt-get install -y -q mongodb-org=2.6.1 mongodb-org-server=2.6.1 mongodb-org-shell=2.6.1 mongodb-org-mongos=2.6.1 mongodb-org-tools=2.6.1 +> RUN apt-get update && apt-get install -y mongodb-org=2.6.1 mongodb-org-server=2.6.1 mongodb-org-shell=2.6.1 mongodb-org-mongos=2.6.1 mongodb-org-tools=2.6.1 MongoDB requires a data directory. Let's create it as the final step of our installation instructions. diff --git a/docs/sources/examples/mongodb/Dockerfile b/docs/sources/examples/mongodb/Dockerfile index e7acc0fd85..9333eb5811 100644 --- a/docs/sources/examples/mongodb/Dockerfile +++ b/docs/sources/examples/mongodb/Dockerfile @@ -11,8 +11,7 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list # Update apt-get sources AND install MongoDB -RUN apt-get update -RUN apt-get install -y -q mongodb-org +RUN apt-get update && apt-get install -y mongodb-org # Create the MongoDB data directory RUN mkdir -p /data/db @@ -20,5 +19,5 @@ RUN mkdir -p /data/db # Expose port #27017 from the container to the host EXPOSE 27017 -# Set usr/bin/mongod as the dockerized entry-point application -ENTRYPOINT usr/bin/mongod +# Set /usr/bin/mongod as the dockerized entry-point application +ENTRYPOINT ["/usr/bin/mongod"] diff --git a/docs/sources/examples/postgresql_service.Dockerfile b/docs/sources/examples/postgresql_service.Dockerfile index 364a18a81d..d0f37669d1 100644 --- a/docs/sources/examples/postgresql_service.Dockerfile +++ b/docs/sources/examples/postgresql_service.Dockerfile @@ -13,17 +13,13 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA # of PostgreSQL, ``9.3``. RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list -# Update the Ubuntu and PostgreSQL repository indexes -RUN apt-get update - # Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.3 # There are some warnings (in red) that show up during the build. You can hide # them by prefixing each apt-get statement with DEBIAN_FRONTEND=noninteractive -RUN apt-get -y -q install python-software-properties software-properties-common -RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 +RUN apt-get update && apt-get install -y python-software-properties software-properties-common postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 # Note: The official Debian and Ubuntu images automatically ``apt-get clean`` -# after each ``apt-get`` +# after each ``apt-get`` # Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed`` USER postgres diff --git a/docs/sources/examples/postgresql_service.md b/docs/sources/examples/postgresql_service.md index 5265935e3d..edcd63bbbc 100644 --- a/docs/sources/examples/postgresql_service.md +++ b/docs/sources/examples/postgresql_service.md @@ -35,17 +35,13 @@ Start by creating a new `Dockerfile`: # of PostgreSQL, ``9.3``. RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list - # Update the Ubuntu and PostgreSQL repository indexes - RUN apt-get update - # Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.3 # There are some warnings (in red) that show up during the build. You can hide # them by prefixing each apt-get statement with DEBIAN_FRONTEND=noninteractive - RUN apt-get -y -q install python-software-properties software-properties-common - RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 + RUN apt-get update && apt-get install -y python-software-properties software-properties-common postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 # Note: The official Debian and Ubuntu images automatically ``apt-get clean`` - # after each ``apt-get`` + # after each ``apt-get`` # Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed`` USER postgres diff --git a/docs/sources/examples/running_redis_service.md b/docs/sources/examples/running_redis_service.md index 0eeef0625d..6d052da09e 100644 --- a/docs/sources/examples/running_redis_service.md +++ b/docs/sources/examples/running_redis_service.md @@ -13,8 +13,7 @@ Firstly, we create a `Dockerfile` for our new Redis image. FROM ubuntu:12.10 - RUN apt-get update - RUN apt-get -y install redis-server + RUN apt-get update && apt-get install -y redis-server EXPOSE 6379 ENTRYPOINT ["/usr/bin/redis-server"] @@ -49,9 +48,9 @@ container to only this container. Once inside our freshly created container we need to install Redis to get the `redis-cli` binary to test our connection. - $ apt-get update - $ apt-get -y install redis-server - $ service redis-server stop + $ sudo apt-get update + $ sudo apt-get install redis-server + $ sudo service redis-server stop As we've used the `--link redis:db` option, Docker has created some environment variables in our web application container. diff --git a/docs/sources/examples/running_riak_service.md b/docs/sources/examples/running_riak_service.md index d9f2c42850..c3d83bf663 100644 --- a/docs/sources/examples/running_riak_service.md +++ b/docs/sources/examples/running_riak_service.md @@ -25,13 +25,6 @@ of. We'll use [Ubuntu](https://registry.hub.docker.com/_/ubuntu/) (tag: FROM ubuntu:latest MAINTAINER Hector Castro hector@basho.com -Next, we update the APT cache and apply any updates: - - # Update the APT cache - RUN sed -i.bak 's/main$/main universe/' /etc/apt/sources.list - RUN apt-get update - RUN apt-get upgrade -y - After that, we install and setup a few dependencies: - `curl` is used to download Basho's APT @@ -46,7 +39,7 @@ After that, we install and setup a few dependencies: # Install and setup project dependencies - RUN apt-get install -y curl lsb-release supervisor openssh-server + RUN apt-get update && apt-get install -y curl lsb-release supervisor openssh-server RUN mkdir -p /var/run/sshd RUN mkdir -p /var/log/supervisor @@ -61,23 +54,14 @@ Next, we add Basho's APT repository: RUN curl -sSL http://apt.basho.com/gpg/basho.apt.key | apt-key add -- RUN echo "deb http://apt.basho.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/basho.list - RUN apt-get update After that, we install Riak and alter a few defaults: # Install Riak and prepare it to run - RUN apt-get install -y riak + RUN apt-get update && apt-get install -y riak RUN sed -i.bak 's/127.0.0.1/0.0.0.0/' /etc/riak/app.config RUN echo "ulimit -n 4096" >> /etc/default/riak -Almost there. Next, we add a hack to get us by the lack of -`initctl`: - - # Hack for initctl - # See: https://github.com/dotcloud/docker/issues/1024 - RUN dpkg-divert --local --rename --add /sbin/initctl - RUN ln -s /bin/true /sbin/initctl - Then, we expose the Riak Protocol Buffers and HTTP interfaces, along with SSH: diff --git a/docs/sources/examples/running_ssh_service.Dockerfile b/docs/sources/examples/running_ssh_service.Dockerfile index 57baf88cef..1b8ed02a8a 100644 --- a/docs/sources/examples/running_ssh_service.Dockerfile +++ b/docs/sources/examples/running_ssh_service.Dockerfile @@ -5,10 +5,7 @@ FROM ubuntu:12.04 MAINTAINER Thatcher R. Peskens "thatcher@dotcloud.com" -# make sure the package repository is up to date -RUN apt-get update - -RUN apt-get install -y openssh-server +RUN apt-get update && apt-get install -y openssh-server RUN mkdir /var/run/sshd RUN echo 'root:screencast' |chpasswd diff --git a/docs/sources/examples/running_ssh_service.md b/docs/sources/examples/running_ssh_service.md index a8405e748e..7140678e3b 100644 --- a/docs/sources/examples/running_ssh_service.md +++ b/docs/sources/examples/running_ssh_service.md @@ -15,10 +15,7 @@ quick access to a test container. FROM ubuntu:12.04 MAINTAINER Thatcher R. Peskens "thatcher@dotcloud.com" - # make sure the package repository is up to date - RUN apt-get update - - RUN apt-get install -y openssh-server + RUN apt-get update && apt-get install -y openssh-server RUN mkdir /var/run/sshd RUN echo 'root:screencast' |chpasswd diff --git a/docs/sources/reference/builder.md b/docs/sources/reference/builder.md index 611b0294ff..d825226554 100644 --- a/docs/sources/reference/builder.md +++ b/docs/sources/reference/builder.md @@ -516,23 +516,16 @@ For example you might add something like this: FROM ubuntu MAINTAINER Victor Vieux - # make sure the package repository is up to date - RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list - RUN apt-get update - - RUN apt-get install -y inotify-tools nginx apache2 openssh-server + RUN apt-get update && apt-get install -y inotify-tools nginx apache2 openssh-server # Firefox over VNC # # VERSION 0.3 FROM ubuntu - # make sure the package repository is up to date - RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list - RUN apt-get update # Install vnc, xvfb in order to create a 'fake' display and firefox - RUN apt-get install -y x11vnc xvfb firefox + RUN apt-get update && apt-get install -y x11vnc xvfb firefox RUN mkdir /.vnc # Setup a password RUN x11vnc -storepasswd 1234 ~/.vnc/passwd diff --git a/docs/sources/userguide/dockerimages.md b/docs/sources/userguide/dockerimages.md index 26f969abe8..b7e49058e5 100644 --- a/docs/sources/userguide/dockerimages.md +++ b/docs/sources/userguide/dockerimages.md @@ -245,8 +245,7 @@ example now for building our own Sinatra image for our development team. # This is a comment FROM ubuntu:14.04 MAINTAINER Kate Smith - RUN apt-get -qq update - RUN apt-get -qqy install ruby ruby-dev + RUN apt-get update && apt-get install -y ruby ruby-dev RUN gem install sinatra Let's look at what our `Dockerfile` does. Each instruction prefixes a statement and is capitalized. @@ -272,38 +271,168 @@ Sinatra gem. Now let's take our `Dockerfile` and use the `docker build` command to build an image. $ sudo docker build -t="ouruser/sinatra:v2" . - Uploading context 2.56 kB - Uploading context + Sending build context to Docker daemon 2.048 kB + Sending build context to Docker daemon Step 0 : FROM ubuntu:14.04 - ---> 99ec81b80c55 + ---> e54ca5efa2e9 Step 1 : MAINTAINER Kate Smith - ---> Running in 7c5664a8a0c1 - ---> 2fa8ca4e2a13 - Removing intermediate container 7c5664a8a0c1 - Step 2 : RUN apt-get -qq update - ---> Running in b07cc3fb4256 - ---> 50d21070ec0c - Removing intermediate container b07cc3fb4256 - Step 3 : RUN apt-get -qqy install ruby ruby-dev - ---> Running in a5b038dd127e + ---> Using cache + ---> 851baf55332b + Step 2 : RUN apt-get update && apt-get install -y ruby ruby-dev + ---> Running in 3a2558904e9b Selecting previously unselected package libasan0:amd64. (Reading database ... 11518 files and directories currently installed.) Preparing to unpack .../libasan0_4.8.2-19ubuntu1_amd64.deb ... - . . . + Unpacking libasan0:amd64 (4.8.2-19ubuntu1) ... + Selecting previously unselected package libatomic1:amd64. + Preparing to unpack .../libatomic1_4.8.2-19ubuntu1_amd64.deb ... + Unpacking libatomic1:amd64 (4.8.2-19ubuntu1) ... + Selecting previously unselected package libgmp10:amd64. + Preparing to unpack .../libgmp10_2%3a5.1.3+dfsg-1ubuntu1_amd64.deb ... + Unpacking libgmp10:amd64 (2:5.1.3+dfsg-1ubuntu1) ... + Selecting previously unselected package libisl10:amd64. + Preparing to unpack .../libisl10_0.12.2-1_amd64.deb ... + Unpacking libisl10:amd64 (0.12.2-1) ... + Selecting previously unselected package libcloog-isl4:amd64. + Preparing to unpack .../libcloog-isl4_0.18.2-1_amd64.deb ... + Unpacking libcloog-isl4:amd64 (0.18.2-1) ... + Selecting previously unselected package libgomp1:amd64. + Preparing to unpack .../libgomp1_4.8.2-19ubuntu1_amd64.deb ... + Unpacking libgomp1:amd64 (4.8.2-19ubuntu1) ... + Selecting previously unselected package libitm1:amd64. + Preparing to unpack .../libitm1_4.8.2-19ubuntu1_amd64.deb ... + Unpacking libitm1:amd64 (4.8.2-19ubuntu1) ... + Selecting previously unselected package libmpfr4:amd64. + Preparing to unpack .../libmpfr4_3.1.2-1_amd64.deb ... + Unpacking libmpfr4:amd64 (3.1.2-1) ... + Selecting previously unselected package libquadmath0:amd64. + Preparing to unpack .../libquadmath0_4.8.2-19ubuntu1_amd64.deb ... + Unpacking libquadmath0:amd64 (4.8.2-19ubuntu1) ... + Selecting previously unselected package libtsan0:amd64. + Preparing to unpack .../libtsan0_4.8.2-19ubuntu1_amd64.deb ... + Unpacking libtsan0:amd64 (4.8.2-19ubuntu1) ... + Selecting previously unselected package libyaml-0-2:amd64. + Preparing to unpack .../libyaml-0-2_0.1.4-3ubuntu3_amd64.deb ... + Unpacking libyaml-0-2:amd64 (0.1.4-3ubuntu3) ... + Selecting previously unselected package libmpc3:amd64. + Preparing to unpack .../libmpc3_1.0.1-1ubuntu1_amd64.deb ... + Unpacking libmpc3:amd64 (1.0.1-1ubuntu1) ... + Selecting previously unselected package openssl. + Preparing to unpack .../openssl_1.0.1f-1ubuntu2.4_amd64.deb ... + Unpacking openssl (1.0.1f-1ubuntu2.4) ... + Selecting previously unselected package ca-certificates. + Preparing to unpack .../ca-certificates_20130906ubuntu2_all.deb ... + Unpacking ca-certificates (20130906ubuntu2) ... + Selecting previously unselected package manpages. + Preparing to unpack .../manpages_3.54-1ubuntu1_all.deb ... + Unpacking manpages (3.54-1ubuntu1) ... + Selecting previously unselected package binutils. + Preparing to unpack .../binutils_2.24-5ubuntu3_amd64.deb ... + Unpacking binutils (2.24-5ubuntu3) ... + Selecting previously unselected package cpp-4.8. + Preparing to unpack .../cpp-4.8_4.8.2-19ubuntu1_amd64.deb ... + Unpacking cpp-4.8 (4.8.2-19ubuntu1) ... + Selecting previously unselected package cpp. + Preparing to unpack .../cpp_4%3a4.8.2-1ubuntu6_amd64.deb ... + Unpacking cpp (4:4.8.2-1ubuntu6) ... + Selecting previously unselected package libgcc-4.8-dev:amd64. + Preparing to unpack .../libgcc-4.8-dev_4.8.2-19ubuntu1_amd64.deb ... + Unpacking libgcc-4.8-dev:amd64 (4.8.2-19ubuntu1) ... + Selecting previously unselected package gcc-4.8. + Preparing to unpack .../gcc-4.8_4.8.2-19ubuntu1_amd64.deb ... + Unpacking gcc-4.8 (4.8.2-19ubuntu1) ... + Selecting previously unselected package gcc. + Preparing to unpack .../gcc_4%3a4.8.2-1ubuntu6_amd64.deb ... + Unpacking gcc (4:4.8.2-1ubuntu6) ... + Selecting previously unselected package libc-dev-bin. + Preparing to unpack .../libc-dev-bin_2.19-0ubuntu6_amd64.deb ... + Unpacking libc-dev-bin (2.19-0ubuntu6) ... + Selecting previously unselected package linux-libc-dev:amd64. + Preparing to unpack .../linux-libc-dev_3.13.0-30.55_amd64.deb ... + Unpacking linux-libc-dev:amd64 (3.13.0-30.55) ... + Selecting previously unselected package libc6-dev:amd64. + Preparing to unpack .../libc6-dev_2.19-0ubuntu6_amd64.deb ... + Unpacking libc6-dev:amd64 (2.19-0ubuntu6) ... + Selecting previously unselected package ruby. + Preparing to unpack .../ruby_1%3a1.9.3.4_all.deb ... + Unpacking ruby (1:1.9.3.4) ... + Selecting previously unselected package ruby1.9.1. + Preparing to unpack .../ruby1.9.1_1.9.3.484-2ubuntu1_amd64.deb ... + Unpacking ruby1.9.1 (1.9.3.484-2ubuntu1) ... + Selecting previously unselected package libruby1.9.1. + Preparing to unpack .../libruby1.9.1_1.9.3.484-2ubuntu1_amd64.deb ... + Unpacking libruby1.9.1 (1.9.3.484-2ubuntu1) ... + Selecting previously unselected package manpages-dev. + Preparing to unpack .../manpages-dev_3.54-1ubuntu1_all.deb ... + Unpacking manpages-dev (3.54-1ubuntu1) ... + Selecting previously unselected package ruby1.9.1-dev. + Preparing to unpack .../ruby1.9.1-dev_1.9.3.484-2ubuntu1_amd64.deb ... + Unpacking ruby1.9.1-dev (1.9.3.484-2ubuntu1) ... + Selecting previously unselected package ruby-dev. + Preparing to unpack .../ruby-dev_1%3a1.9.3.4_all.deb ... + Unpacking ruby-dev (1:1.9.3.4) ... + Setting up libasan0:amd64 (4.8.2-19ubuntu1) ... + Setting up libatomic1:amd64 (4.8.2-19ubuntu1) ... + Setting up libgmp10:amd64 (2:5.1.3+dfsg-1ubuntu1) ... + Setting up libisl10:amd64 (0.12.2-1) ... + Setting up libcloog-isl4:amd64 (0.18.2-1) ... + Setting up libgomp1:amd64 (4.8.2-19ubuntu1) ... + Setting up libitm1:amd64 (4.8.2-19ubuntu1) ... + Setting up libmpfr4:amd64 (3.1.2-1) ... + Setting up libquadmath0:amd64 (4.8.2-19ubuntu1) ... + Setting up libtsan0:amd64 (4.8.2-19ubuntu1) ... + Setting up libyaml-0-2:amd64 (0.1.4-3ubuntu3) ... + Setting up libmpc3:amd64 (1.0.1-1ubuntu1) ... + Setting up openssl (1.0.1f-1ubuntu2.4) ... + Setting up ca-certificates (20130906ubuntu2) ... + debconf: unable to initialize frontend: Dialog + debconf: (TERM is not set, so the dialog frontend is not usable.) + debconf: falling back to frontend: Readline + debconf: unable to initialize frontend: Readline + debconf: (This frontend requires a controlling tty.) + debconf: falling back to frontend: Teletype + Setting up manpages (3.54-1ubuntu1) ... + Setting up binutils (2.24-5ubuntu3) ... + Setting up cpp-4.8 (4.8.2-19ubuntu1) ... + Setting up cpp (4:4.8.2-1ubuntu6) ... + Setting up libgcc-4.8-dev:amd64 (4.8.2-19ubuntu1) ... + Setting up gcc-4.8 (4.8.2-19ubuntu1) ... + Setting up gcc (4:4.8.2-1ubuntu6) ... + Setting up libc-dev-bin (2.19-0ubuntu6) ... + Setting up linux-libc-dev:amd64 (3.13.0-30.55) ... + Setting up libc6-dev:amd64 (2.19-0ubuntu6) ... + Setting up manpages-dev (3.54-1ubuntu1) ... + Setting up libruby1.9.1 (1.9.3.484-2ubuntu1) ... + Setting up ruby1.9.1-dev (1.9.3.484-2ubuntu1) ... + Setting up ruby-dev (1:1.9.3.4) ... Setting up ruby (1:1.9.3.4) ... Setting up ruby1.9.1 (1.9.3.484-2ubuntu1) ... Processing triggers for libc-bin (2.19-0ubuntu6) ... - ---> 2acb20f17878 - Removing intermediate container a5b038dd127e - Step 4 : RUN gem install sinatra - ---> Running in 5e9d0065c1f7 - . . . + Processing triggers for ca-certificates (20130906ubuntu2) ... + Updating certificates in /etc/ssl/certs... 164 added, 0 removed; done. + Running hooks in /etc/ca-certificates/update.d....done. + ---> c55c31703134 + Removing intermediate container 3a2558904e9b + Step 3 : RUN gem install sinatra + ---> Running in 6b81cb6313e5 + unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping + unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping + Successfully installed rack-1.5.2 + Successfully installed tilt-1.4.1 Successfully installed rack-protection-1.5.3 Successfully installed sinatra-1.4.5 4 gems installed - ---> 324104cde6ad - Removing intermediate container 5e9d0065c1f7 - Successfully built 324104cde6ad + Installing ri documentation for rack-1.5.2... + Installing ri documentation for tilt-1.4.1... + Installing ri documentation for rack-protection-1.5.3... + Installing ri documentation for sinatra-1.4.5... + Installing RDoc documentation for rack-1.5.2... + Installing RDoc documentation for tilt-1.4.1... + Installing RDoc documentation for rack-protection-1.5.3... + Installing RDoc documentation for sinatra-1.4.5... + ---> 97feabe5d2ed + Removing intermediate container 6b81cb6313e5 + Successfully built 97feabe5d2ed We've specified our `docker build` command and used the `-t` flag to identify our new image as belonging to the user `ouruser`, the repository name `sinatra` diff --git a/hack/release.sh b/hack/release.sh index 2a6b3992ef..adc4280a30 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -290,7 +290,8 @@ echo deb $(s3_url)/ubuntu docker main > /etc/apt/sources.list.d/docker.list apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 # Install docker -apt-get update ; apt-get install -y lxc-docker +apt-get update +apt-get install -y lxc-docker # # Alternatively, just use the curl-able install.sh script provided at $(s3_url) -- cgit v1.2.1 From 6b8d22e4468209e4177954dcf091f36405bc7c54 Mon Sep 17 00:00:00 2001 From: Lachlan Coote Date: Thu, 31 Jul 2014 19:26:32 -0700 Subject: #1852 Remote API documentation incorrect regarding private registries Issues addressed: - Remote API doco refers to "registry" parameter which is not supported - Neglects to mention "tag" parameter which is supported - Offers no guidance on pushing to private registries Changes made: - As directed in review comments, `registry` removed from all api versions (1.0-1.14) - Have added documentation for `tag` parameter and guidance on private registries for versions 1.10-1.14 (I have only validated this on .10) Docker-DCO-1.1-Signed-off-by: Lachlan Coote (github: lcoote) (cherry picked from commit a5c5dc121c794daa199a813a95c0affd766a18f4) Conflicts: docs/sources/reference/api/docker_remote_api_v1.14.md Docker-DCO-1.1-Signed-off-by: Lachlan Coote (github: SvenDowideit) --- docs/sources/reference/api/docker_remote_api_v1.0.md | 6 ------ docs/sources/reference/api/docker_remote_api_v1.1.md | 6 ------ docs/sources/reference/api/docker_remote_api_v1.10.md | 11 ++++++++++- docs/sources/reference/api/docker_remote_api_v1.11.md | 11 ++++++++++- docs/sources/reference/api/docker_remote_api_v1.12.md | 11 ++++++++++- docs/sources/reference/api/docker_remote_api_v1.13.md | 11 ++++++++++- docs/sources/reference/api/docker_remote_api_v1.2.md | 6 ------ docs/sources/reference/api/docker_remote_api_v1.3.md | 6 ------ docs/sources/reference/api/docker_remote_api_v1.4.md | 6 ------ docs/sources/reference/api/docker_remote_api_v1.5.md | 6 ------ docs/sources/reference/api/docker_remote_api_v1.6.md | 6 ------ docs/sources/reference/api/docker_remote_api_v1.7.md | 6 ------ docs/sources/reference/api/docker_remote_api_v1.8.md | 6 ------ docs/sources/reference/api/docker_remote_api_v1.9.md | 6 ------ 14 files changed, 40 insertions(+), 64 deletions(-) diff --git a/docs/sources/reference/api/docker_remote_api_v1.0.md b/docs/sources/reference/api/docker_remote_api_v1.0.md index 9873785f32..ce45e63994 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.0.md +++ b/docs/sources/reference/api/docker_remote_api_v1.0.md @@ -677,12 +677,6 @@ Push the image `name` on the registry {{ STREAM }} - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.1.md b/docs/sources/reference/api/docker_remote_api_v1.1.md index fa2f878d14..776ba3e505 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.1.md +++ b/docs/sources/reference/api/docker_remote_api_v1.1.md @@ -687,12 +687,6 @@ Push the image `name` on the registry {"error":"Invalid..."} ... - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.10.md b/docs/sources/reference/api/docker_remote_api_v1.10.md index 88674bfcc5..fb3b2db041 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.10.md +++ b/docs/sources/reference/api/docker_remote_api_v1.10.md @@ -853,11 +853,20 @@ Push the image `name` on the registry {"error":"Invalid..."} ... + If you wish to push an image on to a private registry, that image must already have been tagged + into a repository which references that registry host name and port. This repository name should + then be used in the URL. This mirrors the flow of the CLI. + + **Example request**: + + POST /images/registry.acme.com:5000/test/push HTTP/1.1 + + Query Parameters:   - - **registry** – the registry you wan to push, optional + - **tag** – the tag to associate with the image on the registry, optional Request Headers: diff --git a/docs/sources/reference/api/docker_remote_api_v1.11.md b/docs/sources/reference/api/docker_remote_api_v1.11.md index ae2daae407..506adc968d 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.11.md +++ b/docs/sources/reference/api/docker_remote_api_v1.11.md @@ -861,11 +861,20 @@ Push the image `name` on the registry {"error":"Invalid..."} ... + If you wish to push an image on to a private registry, that image must already have been tagged + into a repository which references that registry host name and port. This repository name should + then be used in the URL. This mirrors the flow of the CLI. + + **Example request**: + + POST /images/registry.acme.com:5000/test/push HTTP/1.1 + + Query Parameters:   - - **registry** – the registry you wan to push, optional + - **tag** – the tag to associate with the image on the registry, optional Request Headers: diff --git a/docs/sources/reference/api/docker_remote_api_v1.12.md b/docs/sources/reference/api/docker_remote_api_v1.12.md index 3007a3e580..3e292d8b38 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.12.md +++ b/docs/sources/reference/api/docker_remote_api_v1.12.md @@ -914,11 +914,20 @@ Push the image `name` on the registry {"error":"Invalid..."} ... + If you wish to push an image on to a private registry, that image must already have been tagged + into a repository which references that registry host name and port. This repository name should + then be used in the URL. This mirrors the flow of the CLI. + + **Example request**: + + POST /images/registry.acme.com:5000/test/push HTTP/1.1 + + Query Parameters:   - - **registry** – the registry you wan to push, optional + - **tag** – the tag to associate with the image on the registry, optional Request Headers: diff --git a/docs/sources/reference/api/docker_remote_api_v1.13.md b/docs/sources/reference/api/docker_remote_api_v1.13.md index 9fefc51c4a..eda51000a4 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.13.md +++ b/docs/sources/reference/api/docker_remote_api_v1.13.md @@ -914,11 +914,20 @@ Push the image `name` on the registry {"error":"Invalid..."} ... + If you wish to push an image on to a private registry, that image must already have been tagged + into a repository which references that registry host name and port. This repository name should + then be used in the URL. This mirrors the flow of the CLI. + + **Example request**: + + POST /images/registry.acme.com:5000/test/push HTTP/1.1 + + Query Parameters:   - - **registry** – the registry you wan to push, optional + - **tag** – the tag to associate with the image on the registry, optional Request Headers: diff --git a/docs/sources/reference/api/docker_remote_api_v1.2.md b/docs/sources/reference/api/docker_remote_api_v1.2.md index b8d7dfbc99..bf68213864 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.2.md +++ b/docs/sources/reference/api/docker_remote_api_v1.2.md @@ -706,12 +706,6 @@ Push the image `name` on the registry {"error":"Invalid..."} ... - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.3.md b/docs/sources/reference/api/docker_remote_api_v1.3.md index c65e7faae1..e9d643cf77 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.3.md +++ b/docs/sources/reference/api/docker_remote_api_v1.3.md @@ -755,12 +755,6 @@ Push the image `name` on the registry {"error":"Invalid..."} ... - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.4.md b/docs/sources/reference/api/docker_remote_api_v1.4.md index 0c8b9b32bb..1045f74203 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.4.md +++ b/docs/sources/reference/api/docker_remote_api_v1.4.md @@ -801,12 +801,6 @@ Push the image `name` on the registry {"status":"Pushing..."} {"status":"Pushing", "progress":"1/? (n/a)"} {"error":"Invalid..."} ... - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Status Codes: - **200** – no error :statuscode 404: no such image :statuscode diff --git a/docs/sources/reference/api/docker_remote_api_v1.5.md b/docs/sources/reference/api/docker_remote_api_v1.5.md index 0ee7251f1b..5b04957894 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.5.md +++ b/docs/sources/reference/api/docker_remote_api_v1.5.md @@ -805,12 +805,6 @@ Push the image `name` on the registry The `X-Registry-Auth` header can be used to include a base64-encoded AuthConfig object. - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Status Codes: - **200** – no error diff --git a/docs/sources/reference/api/docker_remote_api_v1.6.md b/docs/sources/reference/api/docker_remote_api_v1.6.md index 8e969f85fa..6d4cb7a5f9 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.6.md +++ b/docs/sources/reference/api/docker_remote_api_v1.6.md @@ -910,12 +910,6 @@ Push the image `name` on the registry > The `X-Registry-Auth` header can be used to > include a base64-encoded AuthConfig object. - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Status Codes: - **200** – no error :statuscode 404: no such image :statuscode diff --git a/docs/sources/reference/api/docker_remote_api_v1.7.md b/docs/sources/reference/api/docker_remote_api_v1.7.md index 4efa1c7bc9..9522661181 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.7.md +++ b/docs/sources/reference/api/docker_remote_api_v1.7.md @@ -828,12 +828,6 @@ Push the image `name` on the registry {"error":"Invalid..."} ... - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Request Headers:   diff --git a/docs/sources/reference/api/docker_remote_api_v1.8.md b/docs/sources/reference/api/docker_remote_api_v1.8.md index b8117b5138..76dd386a62 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.8.md +++ b/docs/sources/reference/api/docker_remote_api_v1.8.md @@ -870,12 +870,6 @@ Push the image `name` on the registry {"error":"Invalid..."} ... - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Request Headers:   diff --git a/docs/sources/reference/api/docker_remote_api_v1.9.md b/docs/sources/reference/api/docker_remote_api_v1.9.md index 92068120ef..26d7e04200 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.9.md +++ b/docs/sources/reference/api/docker_remote_api_v1.9.md @@ -874,12 +874,6 @@ Push the image `name` on the registry {"error":"Invalid..."} ... - Query Parameters: - -   - - - **registry** – the registry you wan to push, optional - Request Headers:   -- cgit v1.2.1 From ae8a75b29ccfd0a3e5f8a1fe6d0b38b6e943f29d Mon Sep 17 00:00:00 2001 From: LK4D4 Date: Sun, 3 Aug 2014 12:28:25 +0400 Subject: Fix example of relative WORKDIR Docker-DCO-1.1-Signed-off-by: Alexandr Morozov (github: LK4D4) (cherry picked from commit 5514afcd88d40a7a9321a966292e9f724eeafc36) Docker-DCO-1.1-Signed-off-by: LK4D4 (github: SvenDowideit) --- docs/sources/reference/builder.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/sources/reference/builder.md b/docs/sources/reference/builder.md index d825226554..86dafba00d 100644 --- a/docs/sources/reference/builder.md +++ b/docs/sources/reference/builder.md @@ -444,7 +444,10 @@ It can be used multiple times in the one `Dockerfile`. If a relative path is provided, it will be relative to the path of the previous `WORKDIR` instruction. For example: - WORKDIR /a WORKDIR b WORKDIR c RUN pwd + WORKDIR /a + WORKDIR b + WORKDIR c + RUN pwd The output of the final `pwd` command in this Dockerfile would be `/a/b/c`. -- cgit v1.2.1 From ac6301791a2be7c888ab5390a5c5ba11c0287af0 Mon Sep 17 00:00:00 2001 From: satoru Date: Thu, 7 Aug 2014 14:39:14 +0800 Subject: Make it clear that JSON array format should be used if CMD is used as default arguments Signed-off-by: Xuecong Liao (cherry picked from commit 6e0f072e36d7b367bde7b5c34fda9c47f36af2da) Docker-DCO-1.1-Signed-off-by: satoru (github: SvenDowideit) --- docs/sources/reference/builder.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/sources/reference/builder.md b/docs/sources/reference/builder.md index 86dafba00d..b37da2d2c1 100644 --- a/docs/sources/reference/builder.md +++ b/docs/sources/reference/builder.md @@ -196,6 +196,11 @@ container.** These defaults can include an executable, or they can omit the executable, in which case you must specify an `ENTRYPOINT` instruction as well. +> **Note**: +> If `CMD` is used to provide default arguments for the `ENTRYPOINT` +> instruction, both the `CMD` and `ENTRYPOINT` instructions should be specified +> with the JSON array format. + When used in the shell or exec formats, the `CMD` instruction sets the command to be executed when running the image. -- cgit v1.2.1 From f2d94241a788592d8077b5e7c813d1fb599403cf Mon Sep 17 00:00:00 2001 From: Jan Toebes Date: Mon, 28 Jul 2014 20:43:24 +0200 Subject: Update nodejs_web_app.md The image centos:centos6.4 doesn't exist. Instead you have to choose between the official centos6 or centos7. Both images does not work together with de yum npm install. When choosing an centos6.5 from another distributor (tutum) it works. (cherry picked from commit 2519872d77da8cb6a9c5f55e44cfaeb9cd603978) Docker-DCO-1.1-Signed-off-by: Jan Toebes (github: SvenDowideit) --- docs/sources/examples/nodejs_web_app.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sources/examples/nodejs_web_app.md b/docs/sources/examples/nodejs_web_app.md index 03c48b5175..840d85e12e 100644 --- a/docs/sources/examples/nodejs_web_app.md +++ b/docs/sources/examples/nodejs_web_app.md @@ -69,7 +69,7 @@ top of. Here, we'll use [CentOS](https://registry.hub.docker.com/_/centos/) (tag: `6.4`) available on the [Docker Hub](https://hub.docker.com/): - FROM centos:6.4 + FROM tutum/centos-6.4 Since we're building a Node.js app, you'll have to install Node.js as well as npm on your CentOS image. Node.js is required to run your app @@ -109,7 +109,7 @@ defines your runtime, i.e. `node`, and the path to our app, i.e. `src/index.js` Your `Dockerfile` should now look like this: # DOCKER-VERSION 0.3.4 - FROM centos:6.4 + FROM tutum/centos-6.4 # Enable EPEL for Node.js RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm @@ -137,9 +137,9 @@ Your image will now be listed by Docker: $ sudo docker images # Example - REPOSITORY TAG ID CREATED - centos 6.4 539c0211cd76 8 weeks ago - /centos-node-hello latest d64d3505b0d2 2 hours ago + REPOSITORY TAG ID CREATED + tutum centos-6.4 539c0211cd76 8 weeks ago + /centos-node-hello latest d64d3505b0d2 2 hours ago ## Run the image -- cgit v1.2.1 From 985f14876cc1fc4336856e3889a9c1bd9612eee9 Mon Sep 17 00:00:00 2001 From: Jan Toebes Date: Thu, 31 Jul 2014 08:54:22 +0200 Subject: Update nodejs_web_app.md Updated to documentation to use the centos6 image instead of the unofficial tutum image of centos6.4 (cherry picked from commit bfacdfdccf5e93301842309a0048990ef0ebb549) Docker-DCO-1.1-Signed-off-by: Jan Toebes (github: SvenDowideit) --- docs/sources/examples/nodejs_web_app.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/sources/examples/nodejs_web_app.md b/docs/sources/examples/nodejs_web_app.md index 840d85e12e..5d69fd713b 100644 --- a/docs/sources/examples/nodejs_web_app.md +++ b/docs/sources/examples/nodejs_web_app.md @@ -66,10 +66,10 @@ requires to build (this example uses Docker 0.3.4): Next, define the parent image you want to use to build your own image on top of. Here, we'll use -[CentOS](https://registry.hub.docker.com/_/centos/) (tag: `6.4`) +[CentOS](https://registry.hub.docker.com/_/centos/) (tag: `centos6`) available on the [Docker Hub](https://hub.docker.com/): - FROM tutum/centos-6.4 + FROM centos:centos6 Since we're building a Node.js app, you'll have to install Node.js as well as npm on your CentOS image. Node.js is required to run your app @@ -109,7 +109,7 @@ defines your runtime, i.e. `node`, and the path to our app, i.e. `src/index.js` Your `Dockerfile` should now look like this: # DOCKER-VERSION 0.3.4 - FROM tutum/centos-6.4 + FROM centos:centos6 # Enable EPEL for Node.js RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm @@ -137,9 +137,9 @@ Your image will now be listed by Docker: $ sudo docker images # Example - REPOSITORY TAG ID CREATED - tutum centos-6.4 539c0211cd76 8 weeks ago - /centos-node-hello latest d64d3505b0d2 2 hours ago + REPOSITORY TAG ID CREATED + centos centos6 539c0211cd76 8 weeks ago + /centos-node-hello latest d64d3505b0d2 2 hours ago ## Run the image -- cgit v1.2.1 From 5ff4ccb8fcb9c0fbb168f32fb6e8a17a02976b82 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Thu, 7 Aug 2014 15:41:23 +0200 Subject: Updated openSUSE's installation instructions Cover network configuration and reference the official openSUSE image inside of the examples. Docker-DCO-1.1-Signed-off-by: Flavio Castelli (github: flavio) (cherry picked from commit 90e97960fa2282189f16b44a8699b3c6ec12e520) Docker-DCO-1.1-Signed-off-by: Flavio Castelli (github: SvenDowideit) --- docs/sources/installation/openSUSE.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/sources/installation/openSUSE.md b/docs/sources/installation/openSUSE.md index c03c74a811..5dd8dd00d2 100644 --- a/docs/sources/installation/openSUSE.md +++ b/docs/sources/installation/openSUSE.md @@ -51,9 +51,23 @@ Docker daemon. You can add users with: To verify that everything has worked as expected: - $ sudo docker run --rm -i -t ubuntu /bin/bash + $ sudo docker run --rm -i -t opensuse /bin/bash + +This should download and import the `opensuse` image, and then start `bash` in +a container. To exit the container type `exit`. + +If you want your containers to be able to access the external network you must +enable the `net.ipv4.ip_forward` rule. +This can be done using YaST by browsing to the +`Network Devices -> Network Settings -> Routing` menu and ensuring that the +`Enable IPv4 Forwarding` box is checked. + +This option cannot be changed when networking is handled by the Network Manager. +In such cases the `/etc/sysconfig/SuSEfirewall2` file needs to be edited by +hand to ensure the `FW_ROUTE` flag is set to `yes` like so: + + FW_ROUTE="yes" -This should download and import the `ubuntu` image, and then start `bash` in a container. To exit the container type `exit`. **Done!** -- cgit v1.2.1 From f83b847068bc72ea038d420c4945a5e2e453ba22 Mon Sep 17 00:00:00 2001 From: Hollie Teal Date: Mon, 4 Aug 2014 11:12:01 -0700 Subject: Added "Github Submodules" section to Automated Builds doc. Signed-off-by: Hollie Teal (cherry picked from commit bafad8cdc444744069ef005f83bb328c6f8e3b16) Docker-DCO-1.1-Signed-off-by: Hollie Teal (github: SvenDowideit) --- docs/sources/docker-hub/builds.md | 28 +++++++++++++++++++++ docs/sources/docker-hub/hub-images/deploy_key.png | Bin 0 -> 162811 bytes .../docker-hub/hub-images/github_deploy_key.png | Bin 0 -> 80447 bytes 3 files changed, 28 insertions(+) create mode 100644 docs/sources/docker-hub/hub-images/deploy_key.png create mode 100644 docs/sources/docker-hub/hub-images/github_deploy_key.png diff --git a/docs/sources/docker-hub/builds.md b/docs/sources/docker-hub/builds.md index bbca826e45..937912ec71 100644 --- a/docs/sources/docker-hub/builds.md +++ b/docs/sources/docker-hub/builds.md @@ -58,6 +58,34 @@ Automatic Build. You can [create an Automated Build](https://registry.hub.docker.com/builds/github/select/) from any of your public or private GitHub repositories with a `Dockerfile`. +### Github Submodules + +If your repository contains links to private submodules, you'll need to add a deploy key so that the Docker Hub will be able to clone the repository from Github. + +Your Docker Hub deploy key is located under the "Build Details" menu on the automated build's main page in the Hub. Add this key to your GitHub submodule by viewing the Settings page for the repository on GitHub and selecting "Deploy keys". + + + + + + + + + + + + + + + + + + + + + +
StepScreenshotDescription
1.Your automated build's deploy key is in the "Build Details" menu under "Deploy keys".
2.In your GitHub submodule's repository Settings page, add the deploy key from your Docker Hub automated build.
+ ### GitHub organizations GitHub organizations will appear once your membership to that organization is diff --git a/docs/sources/docker-hub/hub-images/deploy_key.png b/docs/sources/docker-hub/hub-images/deploy_key.png new file mode 100644 index 0000000000..c4377bba9b Binary files /dev/null and b/docs/sources/docker-hub/hub-images/deploy_key.png differ diff --git a/docs/sources/docker-hub/hub-images/github_deploy_key.png b/docs/sources/docker-hub/hub-images/github_deploy_key.png new file mode 100644 index 0000000000..bd69054b14 Binary files /dev/null and b/docs/sources/docker-hub/hub-images/github_deploy_key.png differ -- cgit v1.2.1 From 63951c9dcb408ad80d014901d33e2c374f45d61a Mon Sep 17 00:00:00 2001 From: Hollie Teal Date: Tue, 5 Aug 2014 19:06:52 -0700 Subject: Made requested changes (capitalization) (cherry picked from commit 4d0527856ca4bd0037313f02a3487845af97330e) Docker-DCO-1.1-Signed-off-by: Hollie Teal (github: SvenDowideit) --- docs/sources/docker-hub/builds.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/docker-hub/builds.md b/docs/sources/docker-hub/builds.md index 937912ec71..3d8159b451 100644 --- a/docs/sources/docker-hub/builds.md +++ b/docs/sources/docker-hub/builds.md @@ -60,7 +60,7 @@ from any of your public or private GitHub repositories with a `Dockerfile`. ### Github Submodules -If your repository contains links to private submodules, you'll need to add a deploy key so that the Docker Hub will be able to clone the repository from Github. +If your repository contains links to private submodules, you'll need to add a deploy key so that the Docker Hub will be able to clone the repository from GitHub. Your Docker Hub deploy key is located under the "Build Details" menu on the automated build's main page in the Hub. Add this key to your GitHub submodule by viewing the Settings page for the repository on GitHub and selecting "Deploy keys". @@ -81,7 +81,7 @@ Your Docker Hub deploy key is located under the "Build Details" menu on the auto 2. - In your GitHub submodule's repository Settings page, add the deploy key from your Docker Hub automated build. + In your GitHub submodule's repository Settings page, add the deploy key from your Docker Hub Automated Build. -- cgit v1.2.1 From 9c50d222a4c234cda646229f3819728572f334b8 Mon Sep 17 00:00:00 2001 From: Patrick Hemmer Date: Sun, 10 Aug 2014 12:47:46 -0400 Subject: fix command output examples in cli documentation f87a97f accidentally added a few too many `$` line prefixes Docker-DCO-1.1-Signed-off-by: Patrick Hemmer (github: phemmer) (cherry picked from commit d613f1121751dd76939b9089d60729e6ed6140a6) Docker-DCO-1.1-Signed-off-by: Patrick Hemmer (github: SvenDowideit) --- docs/sources/reference/commandline/cli.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index e82a5b1127..a802b9dbb3 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -500,7 +500,7 @@ by default. 77af4d6b9913 19 hours ago 1.089 GB committest latest b6fa739cedf5 19 hours ago 1.089 GB 78a85c484f71 19 hours ago 1.089 GB - $ docker latest 30557a29d5ab 20 hours ago 1.089 GB + docker latest 30557a29d5ab 20 hours ago 1.089 GB 0124422dd9f9 20 hours ago 1.089 GB 18ad6fad3402 22 hours ago 1.082 GB f9f1e26352f0 23 hours ago 1.089 GB @@ -514,7 +514,7 @@ by default. 77af4d6b9913e693e8d0b4b294fa62ade6054e6b2f1ffb617ac955dd63fb0182 19 hours ago 1.089 GB committest latest b6fa739cedf5ea12a620a439402b6004d057da800f91c7524b5086a5e4749c9f 19 hours ago 1.089 GB 78a85c484f71509adeaace20e72e941f6bdd2b25b4c75da8693efd9f61a37921 19 hours ago 1.089 GB - $ docker latest 30557a29d5abc51e5f1d5b472e79b7e296f595abcf19fe6b9199dbbc809c6ff4 20 hours ago 1.089 GB + docker latest 30557a29d5abc51e5f1d5b472e79b7e296f595abcf19fe6b9199dbbc809c6ff4 20 hours ago 1.089 GB 0124422dd9f9cf7ef15c0617cda3931ee68346455441d66ab8bdc5b05e9fdce5 20 hours ago 1.089 GB 18ad6fad340262ac2a636efd98a6d1f0ea775ae3d45240d3418466495a19a81b 22 hours ago 1.082 GB f9f1e26352f0a3ba6a0ff68167559f64f3e21ff7ada60366e2d44a04befd1d3a 23 hours ago 1.089 GB -- cgit v1.2.1 From 4c7f90252dbd08e4f5aa5b6efe0a74aee05645b1 Mon Sep 17 00:00:00 2001 From: wyc Date: Sat, 9 Aug 2014 14:00:29 -0400 Subject: Update gentoolinux.md (cherry picked from commit 6ba1949e6aed4b8a6d81b9ad4a43a4743f39ac32) Docker-DCO-1.1-Signed-off-by: wyc (github: SvenDowideit) --- docs/sources/installation/gentoolinux.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/sources/installation/gentoolinux.md b/docs/sources/installation/gentoolinux.md index 62fdc9f00e..ac92ad39c8 100644 --- a/docs/sources/installation/gentoolinux.md +++ b/docs/sources/installation/gentoolinux.md @@ -39,6 +39,9 @@ and especially missing kernel configuration flags and/or dependencies, https://github.com/tianon/docker-overlay/issues) or ping tianon directly in the #docker IRC channel on the freenode network. +Other use flags are described in detail on [tianon's +blog](https://tianon.github.io/post/2014/05/17/docker-on-gentoo.html). + ## Starting Docker Ensure that you are running a kernel that includes all the necessary -- cgit v1.2.1 From 0de59560482e23b802b18b510907a9097ef8326b Mon Sep 17 00:00:00 2001 From: "O.S. Tezer" Date: Sat, 9 Aug 2014 14:55:47 +0300 Subject: Docs: Fix builds.md line-length + minor typo issues This PR proposes to fix some already existing (i.e., older) line-length & line-alignment issues and the ones recently included/merged with the PR #7406 (https://github.com/docker/docker/pull/7406). It also proposes to fix a couple minor typography mistakes (i.e., spelling of GitHub and Service Hooks (headers)) This PR does *not* propose any content changes. Docker-DCO-1.1-Signed-off-by: O.S. Tezer (github: ostezer) (cherry picked from commit 8b3f2381d0a842bc39c34c39647722fc783d968c) Docker-DCO-1.1-Signed-off-by: O.S. Tezer (github: SvenDowideit) --- docs/sources/docker-hub/builds.md | 137 ++++++++++++++++++++------------------ 1 file changed, 74 insertions(+), 63 deletions(-) diff --git a/docs/sources/docker-hub/builds.md b/docs/sources/docker-hub/builds.md index 3d8159b451..3e323af3c8 100644 --- a/docs/sources/docker-hub/builds.md +++ b/docs/sources/docker-hub/builds.md @@ -1,41 +1,43 @@ page_title: Automated Builds on Docker Hub page_description: Docker Hub Automated Builds page_keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, trusted, builds, trusted builds, automated builds + # Automated Builds on Docker Hub ## About Automated Builds -*Automated Builds* are a special feature of Docker Hub which allow you to use -[Docker Hub's](https://hub.docker.com) build clusters to automatically create images from -a specified `Dockerfile` and a GitHub or Bitbucket repo (or "context"). The system will -clone your repository and build the image described by the `Dockerfile` using the -repository as the context. The resulting automated image will then be uploaded to the -Docker Hub registry and marked as an *Automated Build*. +*Automated Builds* are a special feature of Docker Hub which allow you to +use [Docker Hub's](https://hub.docker.com) build clusters to automatically +create images from a specified `Dockerfile` and a GitHub or Bitbucket repo +(or "context"). The system will clone your repository and build the image +described by the `Dockerfile` using the repository as the context. The +resulting automated image will then be uploaded to the Docker Hub registry +and marked as an *Automated Build*. Automated Builds have several advantages: -* Users of *your* Automated Build can trust that the resulting image was built exactly as -specified. +* Users of *your* Automated Build can trust that the resulting +image was built exactly as specified. -* The `Dockerfile` will be available to anyone with access to your repository -on the Docker Hub registry. +* The `Dockerfile` will be available to anyone with access to +your repository on the Docker Hub registry. -* Because the process is automated, Automated Builds help to make sure that your -repository is always up to date. +* Because the process is automated, Automated Builds help to +make sure that your repository is always up to date. -Automated Builds are supported for both public and private repositories on both -[GitHub](http://github.com) and [Bitbucket](https://bitbucket.org/). +Automated Builds are supported for both public and private repositories +on both [GitHub](http://github.com) and [Bitbucket](https://bitbucket.org/). -To use Automated Builds, you must have an -[account on Docker Hub](http://docs.docker.com/userguide/dockerhub/#creating-a-docker-hub-account) -and on GitHub and/or Bitbucket. In either case, the account needs to be properly -validated and activated before you can link to it. +To use Automated Builds, you must have an [account on Docker Hub]( +http://docs.docker.com/userguide/dockerhub/#creating-a-docker-hub-account) +and on GitHub and/or Bitbucket. In either case, the account needs +to be properly validated and activated before you can link to it. ## Setting up Automated Builds with GitHub In order to set up an Automated Build, you need to first link your -[Docker Hub](https://hub.docker.com) account with a GitHub account. This -will allow the registry to see your repositories. +[Docker Hub](https://hub.docker.com) account with a GitHub account. +This will allow the registry to see your repositories. > *Note:* > Automated Builds currently require *read* and *write* access since @@ -43,26 +45,32 @@ will allow the registry to see your repositories. > hook. We have no choice here, this is how GitHub manages permissions, sorry! > We do guarantee nothing else will be touched in your account. -To get started, log into your Docker Hub account and click the "+ Add Repository" button -at the upper right of the screen. Then select +To get started, log into your Docker Hub account and click the +"+ Add Repository" button at the upper right of the screen. Then select [Automated Build](https://registry.hub.docker.com/builds/add/). Select the [GitHub service](https://registry.hub.docker.com/associate/github/). -Then follow the onscreen instructions to authorize and link your GitHub account to Docker -Hub. Once it is linked, you'll be able to choose a repo from which to create the -Automatic Build. +Then follow the onscreen instructions to authorize and link your +GitHub account to Docker Hub. Once it is linked, you'll be able to +choose a repo from which to create the Automatic Build. ### Creating an Automated Build -You can [create an Automated Build](https://registry.hub.docker.com/builds/github/select/) -from any of your public or private GitHub repositories with a `Dockerfile`. +You can [create an Automated Build]( +https://registry.hub.docker.com/builds/github/select/) from any of your +public or private GitHub repositories with a `Dockerfile`. -### Github Submodules +### GitHub Submodules -If your repository contains links to private submodules, you'll need to add a deploy key so that the Docker Hub will be able to clone the repository from GitHub. +If your repository contains links to private submodules, you'll +need to add a deploy key so that the Docker Hub will be able to +clone the repository from GitHub. -Your Docker Hub deploy key is located under the "Build Details" menu on the automated build's main page in the Hub. Add this key to your GitHub submodule by viewing the Settings page for the repository on GitHub and selecting "Deploy keys". +Your Docker Hub deploy key is located under the "Build Details" +menu on the automated build's main page in the Hub. Add this key +to your GitHub submodule by viewing the Settings page for the +repository on GitHub and selecting "Deploy keys". @@ -86,16 +94,16 @@ Your Docker Hub deploy key is located under the "Build Details" menu on the auto
-### GitHub organizations +### GitHub Organizations GitHub organizations will appear once your membership to that organization is made public on GitHub. To verify, you can look at the members tab for your organization on GitHub. -### GitHub service hooks +### GitHub Service Hooks -Follow the steps below to configure the GitHub service hooks for your -Automated Build: +Follow the steps below to configure the GitHub service +hooks for your Automated Build: @@ -127,18 +135,19 @@ Automated Build: ## Setting up Automated Builds with Bitbucket In order to setup an Automated Build, you need to first link your -[Docker Hub](https://hub.docker.com) account with a Bitbucket account. This -will allow the registry to see your repositories. +[Docker Hub](https://hub.docker.com) account with a Bitbucket account. +This will allow the registry to see your repositories. -To get started, log into your Docker Hub account and click the "+ Add Repository" button at -the upper right of the screen. Then select [Automated Build](https://registry.hub.docker.com/builds/add/). +To get started, log into your Docker Hub account and click the +"+ Add Repository" button at the upper right of the screen. Then +select [Automated Build](https://registry.hub.docker.com/builds/add/). -Select the [Bitbucket -source](https://registry.hub.docker.com/associate/bitbucket/). +Select the [Bitbucket source]( +https://registry.hub.docker.com/associate/bitbucket/). -Then follow the onscreen instructions to authorize and link your Bitbucket account -to Docker Hub. Once it is linked, you'll be able to choose a repo from which to create -the Automatic Build. +Then follow the onscreen instructions to authorize and link your +Bitbucket account to Docker Hub. Once it is linked, you'll be able +to choose a repo from which to create the Automatic Build. ### Creating an Automated Build @@ -148,9 +157,9 @@ public or private Bitbucket repositories with a `Dockerfile`. ### Adding a Hook -When you link your Docker Hub account, a `POST` hook should get automatically added to -your Bitbucket repo. Follow the steps below to confirm or modify the Bitbucket hooks for -your Automated Build: +When you link your Docker Hub account, a `POST` hook should get automatically +added to your Bitbucket repo. Follow the steps below to confirm or modify the +Bitbucket hooks for your Automated Build:
@@ -183,10 +192,10 @@ your Automated Build: ## The Dockerfile and Automated Builds -During the build process, Docker will copy the contents of your `Dockerfile`. It will -also add it to the [Docker Hub](https://hub.docker.com) for the Docker community (for -public repos) or approved team members/orgs (for private repos) to see on the repository -page. +During the build process, Docker will copy the contents of your `Dockerfile`. +It will also add it to the [Docker Hub](https://hub.docker.com) for the Docker +community (for public repos) or approved team members/orgs (for private repos) +to see on the repository page. ## README.md @@ -201,20 +210,20 @@ repository's full description.The build process will look for a ### Build triggers -If you need a way to trigger Automated Builds outside of GitHub -or Bitbucket, you can set up a build trigger. When you turn on the build -trigger for an Automated Build, it will give you a URL to which you can -send POST requests. This will trigger the Automated Build, much as with a GitHub webhook. +If you need a way to trigger Automated Builds outside of GitHub or Bitbucket, +you can set up a build trigger. When you turn on the build trigger for an +Automated Build, it will give you a URL to which you can send POST requests. +This will trigger the Automated Build, much as with a GitHub webhook. -Build triggers are available under the Settings menu of each Automated Build repo on the -Docker Hub. +Build triggers are available under the Settings menu of each Automated Build +repo on the Docker Hub. > **Note:** > You can only trigger one build at a time and no more than one > every five minutes. If you already have a build pending, or if you > recently submitted a build request, those requests *will be ignored*. -> To verify everything is working correctly, check the logs of last ten triggers on the -settings page . +> To verify everything is working correctly, check the logs of last +> ten triggers on the settings page . ### Webhooks @@ -264,12 +273,14 @@ Build's repo. ### Repository links -Repository links are a way to associate one Automated Build with another. If one -gets updated,the linking system triggers a rebuild for the other Automated Build. -This makes it easy to keep all your Automated Builds up to date. +Repository links are a way to associate one Automated Build with +another. If one gets updated,the linking system triggers a rebuild +for the other Automated Build. This makes it easy to keep all your +Automated Builds up to date. -To add a link, go to the repo for the Automated Build you want to link to and click on -*Repository Links* under the Settings menu at right. Then, enter the name of the repository that you want have linked. +To add a link, go to the repo for the Automated Build you want to +link to and click on *Repository Links* under the Settings menu at +right. Then, enter the name of the repository that you want have linked. > **Warning:** > You can add more than one repository link, however, you should -- cgit v1.2.1 From 15f1cfbf8bd96b5d77fb8272e1420a6c89449a62 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Fri, 8 Aug 2014 15:26:22 -0400 Subject: fix for issue 7281 add missing comma per O.S. Tezer's commment Signed-off-by: Doug Davis (cherry picked from commit 55dc4f2b94f68e9e1b4e73b1f21cf5151f86e8f8) Docker-DCO-1.1-Signed-off-by: Doug Davis (github: SvenDowideit) --- docs/sources/reference/builder.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/sources/reference/builder.md b/docs/sources/reference/builder.md index b37da2d2c1..1cdcd62d74 100644 --- a/docs/sources/reference/builder.md +++ b/docs/sources/reference/builder.md @@ -164,6 +164,11 @@ any point in an image's history, much like source control. The *exec* form makes it possible to avoid shell string munging, and to `RUN` commands using a base image that does not contain `/bin/sh`. +> **Note**: +> To use a different shell, other than '/bin/sh', use the *exec* form +> passing in the desired shell. For example, +> `RUN ["/bin/bash", "-c", "echo hello"]` + The cache for `RUN` instructions isn't invalidated automatically during the next build. The cache for an instruction like `RUN apt-get dist-upgrade -y` will be reused during the next build. The cache for -- cgit v1.2.1 From 8baac23855bb7a55e64bb7d5528d190d80bc6491 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 10 Aug 2014 20:09:46 +0200 Subject: Add "DEBIAN_FRONTEND" to FAQ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added some explanation on using ‘DEBIAN_FRONTEND’ to the FAQs. As discussed here; https://github.com/docker/docker/pull/7035#issuecomment-50967867 Docker-DCO-1.1-Signed-off-by: Sebastiaan van Stijn (github: thaJeztah) (cherry picked from commit 2e5d35c1f1bf0b565b288fa9146059d9f3af61b7) Docker-DCO-1.1-Signed-off-by: Sebastiaan van Stijn (github: SvenDowideit) --- docs/sources/faq.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/sources/faq.md b/docs/sources/faq.md index 667058c86f..b76a749fe1 100644 --- a/docs/sources/faq.md +++ b/docs/sources/faq.md @@ -225,6 +225,38 @@ Downloading and installing an "all-in-one" .deb or .rpm sounds great at first, except if you have no way to figure out that it contains a copy of the OpenSSL library vulnerable to the [Heartbleed](http://heartbleed.com/) bug. +### Why is `DEBIAN_FRONTEND=noninteractive` discouraged in Dockerfiles? + +When building Docker images on Debian and Ubuntu you may have seen errors like: + + unable to initialize frontend: Dialog + +These errors don't stop the image from being built but inform you that the +installation process tried to open a dialog box, but was unable to. +Generally, these errors are safe to ignore. + +Some people circumvent these errors by changing the `DEBIAN_FRONTEND` +environment variable inside the Dockerfile using: + + ENV DEBIAN_FRONTEND=noninteractive + +This prevents the installer from opening dialog boxes during installation +which stops the errors. + +While this may sound like a good idea, it *may* have side effects. +The `DEBIAN_FRONTEND` environment variable will be inherited by all +images and containers built from your image, effectively changing +their behavior. People using those images will run into problems when +installing software interactively, because installers will not show +any dialog boxes. + +Because of this, and because setting `DEBIAN_FRONTEND` to `noninteractive` is +mainly a 'cosmetic' change, we *discourage* changing it. + +If you *really* need to change its setting, make sure to change it +back to its [default value](https://www.debian.org/releases/stable/i386/ch05s03.html.en) +afterwards. + ### Can I help by adding some questions and answers? Definitely! You can fork [the repo](https://github.com/dotcloud/docker) and -- cgit v1.2.1 From 1a81c3819a7d53b5498f4cf80faa09ecde2737b6 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Mon, 4 Aug 2014 16:13:22 +1000 Subject: tell the user what to expect, including that it is a verbode process. Docker-DCO-1.1-Signed-off-by: Sven Dowideit (github: SvenDowideit) (cherry picked from commit b94f2c4c6d6fa7b3efc0dbf8874735b12d00b57c) Conflicts: docs/sources/articles/https.md --- docs/sources/articles/https.md | 71 +++++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/docs/sources/articles/https.md b/docs/sources/articles/https.md index 6972840652..8a7b2dea4c 100644 --- a/docs/sources/articles/https.md +++ b/docs/sources/articles/https.md @@ -31,25 +31,64 @@ keys: $ echo 01 > ca.srl $ openssl genrsa -des3 -out ca-key.pem 2048 + Generating RSA private key, 2048 bit long modulus + ......+++ + ...............+++ + e is 65537 (0x10001) + Enter pass phrase for ca-key.pem: + Verifying - Enter pass phrase for ca-key.pem: $ openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem + Enter pass phrase for ca-key.pem: + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [AU]: + State or Province Name (full name) [Some-State]:Queensland + Locality Name (eg, city) []:Brisbane + Organization Name (eg, company) [Internet Widgits Pty Ltd]:Docker Inc + Organizational Unit Name (eg, section) []:Boot2Docker + Common Name (e.g. server FQDN or YOUR name) []:your.host.com + Email Address []:Sven@home.org.au Now that we have a CA, you can create a server key and certificate signing request. Make sure that "Common Name (e.g. server FQDN or YOUR name)" matches the hostname you will use to connect to Docker: $ openssl genrsa -des3 -out server-key.pem 2048 - $ openssl req -subj '/CN=****' -new -key server-key.pem -out server.csr + Generating RSA private key, 2048 bit long modulus + ......................................................+++ + ............................................+++ + e is 65537 (0x10001) + Enter pass phrase for server-key.pem: + Verifying - Enter pass phrase for server-key.pem: + $ openssl req -subj '/CN=' -new -key server-key.pem -out server.csr + Enter pass phrase for server-key.pem: -Next we're going to sign the key with our CA: +Next, we're going to sign the key with our CA: $ openssl x509 -req -days 365 -in server.csr -CA ca.pem -CAkey ca-key.pem \ -out server-cert.pem + Signature ok + subject=/CN=your.host.com + Getting CA Private Key + Enter pass phrase for ca-key.pem: For client authentication, create a client key and certificate signing request: - $ openssl genrsa -des3 -out client-key.pem 2048 - $ openssl req -subj '/CN=client' -new -key client-key.pem -out client.csr + $ openssl genrsa -des3 -out key.pem 2048 + Generating RSA private key, 2048 bit long modulus + ...............................................+++ + ...............................................................+++ + e is 65537 (0x10001) + Enter pass phrase for key.pem: + Verifying - Enter pass phrase for key.pem: + $ openssl req -subj '/CN=client' -new -key key.pem -out client.csr + Enter pass phrase for key.pem: To make the key suitable for client authentication, create a extensions config file: @@ -59,13 +98,21 @@ config file: Now sign the key: $ openssl x509 -req -days 365 -in client.csr -CA ca.pem -CAkey ca-key.pem \ - -out client-cert.pem -extfile extfile.cnf + -out cert.pem -extfile extfile.cnf + Signature ok + subject=/CN=client + Getting CA Private Key + Enter pass phrase for ca-key.pem: Finally you need to remove the passphrase from the client and server key: $ openssl rsa -in server-key.pem -out server-key.pem - $ openssl rsa -in client-key.pem -out client-key.pem + Enter pass phrase for server-key.pem: + writing RSA key + $ openssl rsa -in key.pem -out key.pem + Enter pass phrase for key.pem: + writing RSA key Now you can make the Docker daemon only accept connections from clients providing a certificate trusted by our CA: @@ -76,8 +123,8 @@ providing a certificate trusted by our CA: To be able to connect to Docker and validate its certificate, you now need to provide your client keys, certificates and trusted CA: - $ docker --tlsverify --tlscacert=ca.pem --tlscert=client-cert.pem --tlskey=client-key.pem \ - -H=dns-name-of-docker-host:2376 + $ docker --tlsverify --tlscacert=ca.pem --tlscert=cert.pem --tlskey=key.pem \ + -H=dns-name-of-docker-host:2376 version > **Note**: > Docker over TLS should run on TCP port 2376. @@ -96,11 +143,11 @@ the files to the `.docker` directory in your home directory - and set the `DOCKER_HOST` variable as well. $ cp ca.pem ~/.docker/ca.pem - $ cp client-cert.pem ~/.docker/cert.pem - $ cp client-key.pem ~/.docker/key.pem + $ cp cert.pem ~/.docker/cert.pem + $ cp key.pem ~/.docker/key.pem $ export DOCKER_HOST=tcp://:2376 -Then you can just run Docker with the `--tlsverify` option. +Then you can run Docker with the `--tlsverify` option. $ docker --tlsverify ps @@ -128,5 +175,5 @@ to drop your keys into `~/.docker/.pem`. Alternatively, if you want to store your keys in another location, you can specify that location using the environment variable `DOCKER_CONFIG`. - $ export DOCKER_CONFIG=${HOME}/.dockers/zone1/ + $ export DOCKER_CERT_PATH=${HOME}/.docker/zone1/ $ docker --tlsverify ps -- cgit v1.2.1 From 1eafe65bb0f95dcc5205091ad9105b937c62686a Mon Sep 17 00:00:00 2001 From: "Ciro S. Costa" Date: Tue, 12 Aug 2014 02:56:57 -0300 Subject: Updates docs regarding linux mint troubleshot Signed-off-by: Ciro S. Costa (cherry picked from commit fcddecc828a95083db8975391e623289b2fe1254) Docker-DCO-1.1-Signed-off-by: Ciro S. Costa (github: SvenDowideit) --- docs/sources/installation/ubuntulinux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/installation/ubuntulinux.md b/docs/sources/installation/ubuntulinux.md index 5ddc791f4f..673ea18b0c 100644 --- a/docs/sources/installation/ubuntulinux.md +++ b/docs/sources/installation/ubuntulinux.md @@ -266,11 +266,11 @@ These parameters will help you get rid of the following warnings: ## Troubleshooting -On Linux Mint, the `cgroup-lite` package is not +On Linux Mint, the `cgroup-lite` and `apparmor` packages are not installed by default. Before Docker will work correctly, you will need to install this via: - $ sudo apt-get update && sudo apt-get install cgroup-lite + $ sudo apt-get update && sudo apt-get install cgroup-lite apparmor ## Docker and UFW -- cgit v1.2.1 From a7ebf3b7313eb5d0ae92888d1695eb60e3cf5f56 Mon Sep 17 00:00:00 2001 From: ChristoperBiscardi Date: Mon, 11 Aug 2014 16:37:58 -0700 Subject: Private Repos Copy Change Docker-DCO-1.1-Signed-off-by: Christopher Biscardi (github: ChristopherBiscardi) (cherry picked from commit df9650eebb12d980aaf114ac7b2223764dc964b7) Docker-DCO-1.1-Signed-off-by: ChristoperBiscardi (github: SvenDowideit) --- docs/sources/docker-hub/repos.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/docker-hub/repos.md b/docs/sources/docker-hub/repos.md index c219a1989a..dec6376f43 100644 --- a/docs/sources/docker-hub/repos.md +++ b/docs/sources/docker-hub/repos.md @@ -67,7 +67,7 @@ optimized and up-to-date image to power your applications. > organization, product or team you can see more information > [here](https://github.com/dotcloud/stackbrew). -## Private Docker Repositories +## Private Repositories Private repositories allow you to have repositories that contain images that you want to keep private, either to your own account or within an -- cgit v1.2.1 From 553002f5cef5ea93ab5bdfb49df53fc49d54085b Mon Sep 17 00:00:00 2001 From: Michael Thies Date: Tue, 12 Aug 2014 23:30:04 -0500 Subject: Update postgresql_service.md fix typo (cherry picked from commit 99423e7e1ef7d833e333389b15a372179734c03f) Docker-DCO-1.1-Signed-off-by: Michael Thies (github: SvenDowideit) --- docs/sources/examples/postgresql_service.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/examples/postgresql_service.md b/docs/sources/examples/postgresql_service.md index edcd63bbbc..ffd122ed58 100644 --- a/docs/sources/examples/postgresql_service.md +++ b/docs/sources/examples/postgresql_service.md @@ -84,7 +84,7 @@ Containers*](/userguide/dockerlinks), or we can access it from our host > **Note**: > The `--rm` removes the container and its image when -> the container exists successfully. +> the container exits successfully. ### Using container linking -- cgit v1.2.1 From d3f18a46d336cab5cc9d4bcc9f94ab04a0e88c30 Mon Sep 17 00:00:00 2001 From: ChristoperBiscardi Date: Mon, 11 Aug 2014 17:12:34 -0700 Subject: Remove Old shiftWindow() closes #7493 Docker-DCO-1.1-Signed-off-by: Christopher Biscardi (github: ChristopherBiscardi) (cherry picked from commit 1e2ce72ffe28867021121745538c636e22f6f9e8) Docker-DCO-1.1-Signed-off-by: ChristoperBiscardi (github: SvenDowideit) --- docs/theme/mkdocs/base.html | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/theme/mkdocs/base.html b/docs/theme/mkdocs/base.html index ae077ccbaf..c825423f89 100644 --- a/docs/theme/mkdocs/base.html +++ b/docs/theme/mkdocs/base.html @@ -132,17 +132,6 @@ piCId = '1482'; })();