瀏覽代碼

Merge pull request #9836 from SvenDowideit/transcluded-no-sudo-note

Add a note that remote and Boot2Docker users should not type sudo
Michael Crosby 10 年之前
父節點
當前提交
71ab2efbfa

+ 2 - 0
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"]

+ 1 - 1
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
 

+ 2 - 0
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

+ 3 - 0
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.

+ 2 - 0
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:

+ 2 - 0
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

+ 2 - 0
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`:
 

+ 2 - 0
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.