diff --git a/docs/Dockerfile b/docs/Dockerfile index d801ec2130..a29e8c95f8 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -56,4 +56,6 @@ RUN VERSION=$(cat VERSION) \ EXPOSE 8000 +RUN cd sources && rgrep --files-with-matches '{{ include ".*" }}' | xargs sed -i~ 's/{{ include "\(.*\)" }}/cat include\/\1/ge' + CMD ["mkdocs", "serve"] diff --git a/docs/sources/articles/basics.md b/docs/sources/articles/basics.md index 29b9a2f19c..4cdcab4aa4 100644 --- a/docs/sources/articles/basics.md +++ b/docs/sources/articles/basics.md @@ -37,7 +37,7 @@ image cache. > characters of the full image ID - which can be found using > `docker inspect` or `docker images --no-trunc=true` -**If you're using OS X** then you shouldn't use `sudo`. +{{ include "no-remote-sudo.md" }} ## Running an interactive shell diff --git a/docs/sources/faq.md b/docs/sources/faq.md index 169df37f5f..f517db73a4 100644 --- a/docs/sources/faq.md +++ b/docs/sources/faq.md @@ -26,6 +26,8 @@ Windows*](../installation/windows/#windows) installation guides. The small Linux distribution boot2docker can be run inside virtual machines on these two operating systems. +{{ include "no-remote-sudo.md" }} + ### How do containers compare to virtual machines? They are complementary. VMs are best used to allocate chunks of diff --git a/docs/sources/include/no-remote-sudo.md b/docs/sources/include/no-remote-sudo.md new file mode 100644 index 0000000000..065b0cbfd7 --- /dev/null +++ b/docs/sources/include/no-remote-sudo.md @@ -0,0 +1,3 @@ +> **Note:** if you are using a remote Docker daemon, such as Boot2Docker, +> then _do not_ type the `sudo` before the `docker` commands shown in the +> documentation's examples. diff --git a/docs/sources/installation/mac.md b/docs/sources/installation/mac.md index 89fed17115..d31cd697b6 100644 --- a/docs/sources/installation/mac.md +++ b/docs/sources/installation/mac.md @@ -72,6 +72,8 @@ complete. You can test it by following the directions below. ## Running Docker +{{ include "no-remote-sudo.md" }} + From your terminal, you can test that Docker is running with our small `hello-world` example image: Start the vm (`boot2docker start`) and then run: diff --git a/docs/sources/installation/windows.md b/docs/sources/installation/windows.md index 90268867bc..26b2a42a45 100644 --- a/docs/sources/installation/windows.md +++ b/docs/sources/installation/windows.md @@ -49,6 +49,8 @@ and the Boot2Docker management tool. ## Running Docker +{{ include "no-remote-sudo.md" }} + Boot2Docker will log you in automatically so you can start using Docker right away. Let's try the `hello-world` example image. Run diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index 0b7b0cda03..38ee3d2cbc 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -4,6 +4,8 @@ page_keywords: Docker, Docker documentation, CLI, command line # Command Line +{{ include "no-remote-sudo.md" }} + To list available commands, either run `docker` with no parameters or execute `docker help`: diff --git a/docs/sources/userguide/dockerizing.md b/docs/sources/userguide/dockerizing.md index 2383160986..6f56a56955 100644 --- a/docs/sources/userguide/dockerizing.md +++ b/docs/sources/userguide/dockerizing.md @@ -9,6 +9,8 @@ page_keywords: docker guide, docker, docker platform, virtualization framework, Docker allows you to run applications inside containers. Running an application inside a container takes a single command: `docker run`. +{{ include "no-remote-sudo.md" }} + ## Hello world Let's try it now.