diff --git a/docs/sources/contributing/devenvironment.rst b/docs/sources/contributing/devenvironment.rst index fdbc6d7e1f..c152ff9ce5 100644 --- a/docs/sources/contributing/devenvironment.rst +++ b/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/-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: `-dns 8.8.8.8` +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 + + 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,11 +116,23 @@ 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/-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/-dev/binary/docker--dev $(which docker);sudo service docker start``.