Bläddra i källkod

use the Makefile in the dev environment documentation - its way less typing, and fewer typing mistakes

Sven Dowideit 11 år sedan
förälder
incheckning
e9bf971e69
1 ändrade filer med 23 tillägg och 8 borttagningar
  1. 23 8
      docs/sources/contributing/devenvironment.rst

+ 23 - 8
docs/sources/contributing/devenvironment.rst

@@ -42,9 +42,7 @@ This following command will build a development environment using the Dockerfile
 
 .. code-block:: bash
 
-    sudo docker build -t docker .
-
-
+    sudo make build
 
 If the build is successful, congratulations! You have produced a clean build of docker, neatly encapsulated in a standard build environment. 
 
@@ -56,7 +54,7 @@ To create the Docker binary, run this command:
 
 .. code-block:: bash
 
-	sudo docker run -privileged -v `pwd`:/go/src/github.com/dotcloud/docker docker hack/make.sh binary
+	sudo make binary
 
 This will create the Docker binary in ``./bundles/<version>-dev/binary/``
 
@@ -68,10 +66,15 @@ To execute the test cases, run this command:
 
 .. code-block:: bash
 
-	sudo docker run -privileged -v `pwd`:/go/src/github.com/dotcloud/docker docker hack/make.sh test
+	sudo make test
+
 
+Note: if you're running the tests in vagrant, you need to specify a dns entry in 
+the command (either edit the Makefile, or run the step manually): 
+
+.. code-block:: bash
 
-Note: if you're running the tests in vagrant, you need to specify a dns entry in the command: `-dns 8.8.8.8`
+	sudo docker run -dns 8.8.8.8 -privileged -v `pwd`:/go/src/github.com/dotcloud/docker docker hack/make.sh test
 
 If the test are successful then the tail of the output should look something like this
 
@@ -113,10 +116,22 @@ You can run an interactive session in the newly built container:
 
 .. code-block:: bash
 
-	sudo docker run -privileged -i -t docker bash
+	sudo make shell
 
-	# type 'exit' to exit
+	# type 'exit' or Ctrl-D to exit
+
+
+Extra Step: Build and view the Documenation
+-------------------------------------------
+
+If you want to read the documentation from a local website, or are making changes
+to it, you can build the documentation and then serve it by:
+
+.. code-block:: bash
 
+	sudo make doc
+    # when its done, you can point your browser to http://yourdockerhost:8000
+	# type Ctrl-C to exit
 
 
 .. note:: The binary is available outside the container in the directory  ``./bundles/<version>-dev/binary/``. You can swap your host docker executable with this binary for live testing - for example, on ubuntu: ``sudo service docker stop ; sudo cp $(which docker) $(which docker)_ ; sudo cp ./bundles/<version>-dev/binary/docker-<version>-dev $(which docker);sudo service docker start``.