2015-06-07 23:07:20 -04:00
|
|
|
<!--[metadata]>
|
|
|
|
+++
|
|
|
|
title = "Work with a development container"
|
|
|
|
description = "How to use Docker's development environment"
|
|
|
|
keywords = ["development, inception, container, image Dockerfile, dependencies, Go, artifacts"]
|
|
|
|
[menu.main]
|
|
|
|
parent = "smn_develop"
|
2015-06-16 09:04:13 -04:00
|
|
|
weight=5
|
2015-06-07 23:07:20 -04:00
|
|
|
+++
|
|
|
|
<![end-metadata]-->
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
# Work with a development container
|
|
|
|
|
|
|
|
In this section, you learn to develop like a member of Docker's core team.
|
|
|
|
The `docker` repository includes a `Dockerfile` at its root. This file defines
|
|
|
|
Docker's development environment. The `Dockerfile` lists the environment's
|
2015-03-25 22:30:11 -04:00
|
|
|
dependencies: system libraries and binaries, Go environment, Go dependencies,
|
2015-03-06 13:01:31 -05:00
|
|
|
etc.
|
|
|
|
|
|
|
|
Docker's development environment is itself, ultimately a Docker container.
|
2015-03-07 08:06:40 -05:00
|
|
|
You use the `docker` repository and its `Dockerfile` to create a Docker image,
|
|
|
|
run a Docker container, and develop code in the container. Docker itself builds,
|
|
|
|
tests, and releases new Docker versions using this container.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-24 14:25:26 -04:00
|
|
|
If you followed the procedures that <a href="/project/set-up-git" target="_blank">
|
|
|
|
set up Git for contributing</a>, you should have a fork of the `docker/docker`
|
2015-03-07 08:06:40 -05:00
|
|
|
repository. You also created a branch called `dry-run-test`. In this section,
|
|
|
|
you continue working with your fork on this branch.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
## Clean your host of Docker artifacts
|
|
|
|
|
2015-08-05 12:07:11 -04:00
|
|
|
Docker developers run the latest stable release of the Docker software (with Docker Machine if their machine is Mac OS X). They clean their local
|
2015-03-07 08:06:40 -05:00
|
|
|
hosts of unnecessary Docker artifacts such as stopped containers or unused
|
2015-03-25 22:30:11 -04:00
|
|
|
images. Cleaning unnecessary artifacts isn't strictly necessary, but it is
|
2015-03-07 08:06:40 -05:00
|
|
|
good practice, so it is included here.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-08-29 18:21:20 -04:00
|
|
|
To remove unnecessary artifacts:
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
1. Verify that you have no unnecessary containers running on your host.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ docker ps
|
|
|
|
|
|
|
|
You should see something similar to the following:
|
|
|
|
|
2015-03-08 10:41:08 -04:00
|
|
|
<table class="code">
|
2015-03-07 08:06:40 -05:00
|
|
|
<tr>
|
|
|
|
<th>CONTAINER ID</th>
|
|
|
|
<th>IMAGE</th>
|
|
|
|
<th>COMMAND</th>
|
|
|
|
<th>CREATED</th>
|
|
|
|
<th>STATUS</th>
|
|
|
|
<th>PORTS</th>
|
|
|
|
<th>NAMES</th>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
There are no running containers on this host. If you have running but unused
|
|
|
|
containers, stop and then remove them with the `docker stop` and `docker rm`
|
|
|
|
commands.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
2. Verify that your host has no dangling images.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ docker images
|
|
|
|
|
|
|
|
You should see something similar to the following:
|
|
|
|
|
2015-03-08 10:41:08 -04:00
|
|
|
<table class="code">
|
2015-03-07 08:06:40 -05:00
|
|
|
<tr>
|
|
|
|
<th>REPOSITORY</th>
|
|
|
|
<th>TAG</th>
|
|
|
|
<th>IMAGE ID</th>
|
|
|
|
<th>CREATED</th>
|
|
|
|
<th>VIRTUAL SIZE</th>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
This host has no images. You may have one or more _dangling_ images. A
|
|
|
|
dangling image is not used by a running container and is not an ancestor of
|
|
|
|
another image on your system. A fast way to remove dangling containers is
|
|
|
|
the following:
|
|
|
|
|
|
|
|
$ docker rmi -f $(docker images -q -a -f dangling=true)
|
|
|
|
|
2015-03-25 22:30:11 -04:00
|
|
|
This command uses `docker images` to list all images (`-a` flag) by numeric
|
2015-03-28 07:31:02 -04:00
|
|
|
IDs (`-q` flag) and filter them to find dangling images (`-f dangling=true`).
|
|
|
|
Then, the `docker rmi` command forcibly (`-f` flag) removes
|
2015-03-07 08:06:40 -05:00
|
|
|
the resulting list. To remove just one image, use the `docker rmi ID`
|
|
|
|
command.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
## Build an image
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
If you followed the last procedure, your host is clean of unnecessary images
|
|
|
|
and containers. In this section, you build an image from the Docker development
|
|
|
|
environment.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
1. Open a terminal.
|
|
|
|
|
2015-08-19 04:53:55 -04:00
|
|
|
Mac users, use `docker-machine status your_vm_name` to make sure your VM is running. You
|
2015-07-17 16:05:45 -04:00
|
|
|
may need to run `eval "$(docker-machine env your_vm_name)"` to initialize your
|
|
|
|
shell environment.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
3. Change into the root of your forked repository.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ cd ~/repos/docker-fork
|
2015-03-24 14:25:26 -04:00
|
|
|
|
|
|
|
If you are following along with this guide, you created a `dry-run-test`
|
|
|
|
branch when you <a href="/project/set-up-git" target="_blank"> set up Git for
|
2015-03-25 22:30:11 -04:00
|
|
|
contributing</a>.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
4. Ensure you are on your `dry-run-test` branch.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ git checkout dry-run-test
|
2015-03-24 14:25:26 -04:00
|
|
|
|
2015-03-25 22:30:11 -04:00
|
|
|
If you get a message that the branch doesn't exist, add the `-b` flag (git checkout -b dry-run-test) so the
|
2015-03-24 14:25:26 -04:00
|
|
|
command both creates the branch and checks it out.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
5. Compile your development environment container into an image.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ docker build -t dry-run-test .
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
The `docker build` command returns informational message as it runs. The
|
|
|
|
first build may take a few minutes to create an image. Using the
|
|
|
|
instructions in the `Dockerfile`, the build may need to download source and
|
|
|
|
other images. A successful build returns a final status message similar to
|
|
|
|
the following:
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
Successfully built 676815d59283
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
6. List your Docker images again.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ docker images
|
|
|
|
|
|
|
|
You should see something similar to this:
|
|
|
|
|
2015-03-08 10:41:08 -04:00
|
|
|
<table class="code">
|
2015-03-07 08:06:40 -05:00
|
|
|
<tr>
|
|
|
|
<th>REPOSTITORY</th>
|
|
|
|
<th>TAG</th>
|
|
|
|
<th>IMAGE ID</th>
|
|
|
|
<th>CREATED</th>
|
|
|
|
<th>VIRTUAL SIZE</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>dry-run-test</td>
|
|
|
|
<td>latest</td>
|
|
|
|
<td>663fbee70028</td>
|
|
|
|
<td>About a minute ago</td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>ubuntu</td>
|
|
|
|
<td>trusty</td>
|
|
|
|
<td>2d24f826cb16</td>
|
|
|
|
<td>2 days ago</td>
|
|
|
|
<td>188.3 MB</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>ubuntu</td>
|
|
|
|
<td>trusty-20150218.1</td>
|
|
|
|
<td>2d24f826cb16</td>
|
|
|
|
<td>2 days ago</td>
|
|
|
|
<td>188.3 MB</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>ubuntu</td>
|
|
|
|
<td>14.04</td>
|
|
|
|
<td>2d24f826cb16</td>
|
|
|
|
<td>2 days ago</td>
|
|
|
|
<td>188.3 MB</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>ubuntu</td>
|
|
|
|
<td>14.04.2</td>
|
|
|
|
<td>2d24f826cb16</td>
|
|
|
|
<td>2 days ago</td>
|
|
|
|
<td>188.3 MB</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>ubuntu</td>
|
|
|
|
<td>latest</td>
|
|
|
|
<td>2d24f826cb16</td>
|
|
|
|
<td>2 days ago</td>
|
|
|
|
<td>188.3 MB</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
Locate your new `dry-run-test` image in the list. You should also see a
|
|
|
|
number of `ubuntu` images. The build process creates these. They are the
|
|
|
|
ancestors of your new Docker development image. When you next rebuild your
|
|
|
|
image, the build process reuses these ancestors images if they exist.
|
|
|
|
|
|
|
|
Keeping the ancestor images improves the build performance. When you rebuild
|
|
|
|
the child image, the build process uses the local ancestors rather than
|
|
|
|
retrieving them from the Hub. The build process gets new ancestors only if
|
2015-08-19 04:53:55 -04:00
|
|
|
Docker Hub has updated versions.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
## Start a container and run a test
|
|
|
|
|
|
|
|
At this point, you have created a new Docker development environment image. Now,
|
|
|
|
you'll use this image to create a Docker container to develop in. Then, you'll
|
|
|
|
build and run a `docker` binary in your container.
|
|
|
|
|
|
|
|
1. Open two additional terminals on your host.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
At this point, you'll have about three terminals open.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
![Multiple terminals](/project/images/three_terms.png)
|
|
|
|
|
2015-07-17 16:05:45 -04:00
|
|
|
Mac OS X users, make sure you run `eval "$(docker-machine env your_vm_name)"` in
|
|
|
|
any new terminals.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
2. In a terminal, create a new container from your `dry-run-test` image.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ docker run --privileged --rm -ti dry-run-test /bin/bash
|
|
|
|
root@5f8630b873fe:/go/src/github.com/docker/docker#
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
The command creates a container from your `dry-run-test` image. It opens an
|
2015-04-23 17:11:08 -04:00
|
|
|
interactive terminal (`-ti`) running a `/bin/bash` shell. The
|
2015-03-07 08:06:40 -05:00
|
|
|
`--privileged` flag gives the container access to kernel features and device
|
2015-03-25 22:30:11 -04:00
|
|
|
access. This flag allows you to run a container in a container.
|
2015-03-07 08:06:40 -05:00
|
|
|
Finally, the `-rm` flag instructs Docker to remove the container when you
|
|
|
|
exit the `/bin/bash` shell.
|
|
|
|
|
|
|
|
The container includes the source of your image repository in the
|
|
|
|
`/go/src/github.com/docker/docker` directory. Try listing the contents to
|
|
|
|
verify they are the same as that of your `docker-fork` repo.
|
|
|
|
|
|
|
|
![List example](/project/images/list_example.png)
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
3. Investigate your container bit.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
If you do a `go version` you'll find the `go` language is part of the
|
|
|
|
container.
|
|
|
|
|
|
|
|
root@31ed86e9ddcf:/go/src/github.com/docker/docker# go version
|
|
|
|
go version go1.4.2 linux/amd64
|
|
|
|
|
|
|
|
Similarly, if you do a `docker version` you find the container
|
|
|
|
has no `docker` binary.
|
|
|
|
|
|
|
|
root@31ed86e9ddcf:/go/src/github.com/docker/docker# docker version
|
|
|
|
bash: docker: command not found
|
|
|
|
|
|
|
|
You will create one in the next steps.
|
|
|
|
|
2015-03-24 14:25:26 -04:00
|
|
|
4. From the `/go/src/github.com/docker/docker` directory make a `docker` binary
|
|
|
|
with the `make.sh` script.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-12 22:16:56 -04:00
|
|
|
root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh binary
|
2015-03-07 08:06:40 -05:00
|
|
|
|
2015-03-12 22:16:56 -04:00
|
|
|
You only call `hack/make.sh` to build a binary _inside_ a Docker
|
2015-03-07 08:06:40 -05:00
|
|
|
development container as you are now. On your host, you'll use `make`
|
|
|
|
commands (more about this later).
|
|
|
|
|
|
|
|
As it makes the binary, the `make.sh` script reports the build's progress.
|
|
|
|
When the command completes successfully, you should see the following
|
|
|
|
output:
|
|
|
|
|
2015-03-26 19:25:57 -04:00
|
|
|
---> Making bundle: binary (in bundles/1.5.0-dev/binary)
|
|
|
|
Created binary: /go/src/github.com/docker/docker/bundles/1.5.0-dev/binary/docker-1.5.0-dev
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
5. List all the contents of the `binary` directory.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
root@5f8630b873fe:/go/src/github.com/docker/docker# ls bundles/1.5.0-dev/binary/
|
|
|
|
docker docker-1.5.0-dev docker-1.5.0-dev.md5 docker-1.5.0-dev.sha256
|
|
|
|
|
|
|
|
You should see that `binary` directory, just as it sounds, contains the
|
|
|
|
made binaries.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
6. Copy the `docker` binary to the `/usr/bin` of your container.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
root@5f8630b873fe:/go/src/github.com/docker/docker# cp bundles/1.5.0-dev/binary/docker /usr/bin
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
7. Inside your container, check your Docker version.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
root@5f8630b873fe:/go/src/github.com/docker/docker# docker --version
|
|
|
|
Docker version 1.5.0-dev, build 6e728fb
|
|
|
|
|
2015-03-26 22:38:46 -04:00
|
|
|
Inside the container you are running a development version. This is the version
|
|
|
|
on the current branch. It reflects the value of the `VERSION` file at the
|
2015-03-07 08:06:40 -05:00
|
|
|
root of your `docker-fork` repository.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
8. Start a `docker` daemon running inside your container.
|
|
|
|
|
2015-07-22 15:37:17 -04:00
|
|
|
root@5f8630b873fe:/go/src/github.com/docker/docker# docker daemon -D
|
2015-03-07 08:06:40 -05:00
|
|
|
|
2015-08-29 18:21:20 -04:00
|
|
|
The `-D` flag starts the daemon in debug mode. You'll find this useful
|
2015-03-07 08:06:40 -05:00
|
|
|
when debugging your code.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
9. Bring up one of the terminals on your local host.
|
|
|
|
|
|
|
|
|
|
|
|
10. List your containers and look for the container running the `dry-run-test` image.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ docker ps
|
|
|
|
|
2015-03-08 10:41:08 -04:00
|
|
|
<table class="code">
|
2015-03-07 08:06:40 -05:00
|
|
|
<tr>
|
|
|
|
<th>CONTAINER ID</th>
|
|
|
|
<th>IMAGE</th>
|
|
|
|
<th>COMMAND</th>
|
|
|
|
<th>CREATED</th>
|
|
|
|
<th>STATUS</th>
|
|
|
|
<th>PORTS</th>
|
|
|
|
<th>NAMES</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>474f07652525</td>
|
|
|
|
<td>dry-run-test:latest</td>
|
|
|
|
<td>"hack/dind /bin/bash</td>
|
|
|
|
<td>14 minutes ago</td>
|
|
|
|
<td>Up 14 minutes</td>
|
|
|
|
<td></td>
|
|
|
|
<td>tender_shockley</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
In this example, the container's name is `tender_shockley`; yours will be
|
|
|
|
different.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
11. From the terminal, start another shell on your Docker development container.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ docker exec -it tender_shockley bash
|
|
|
|
|
|
|
|
At this point, you have two terminals both with a shell open into your
|
|
|
|
development container. One terminal is running a debug session. The other
|
|
|
|
terminal is displaying a `bash` prompt.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
12. At the prompt, test the Docker client by running the `hello-world` container.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
root@9337c96e017a:/go/src/github.com/docker/docker# docker run hello-world
|
|
|
|
|
|
|
|
You should see the image load and return. Meanwhile, you
|
|
|
|
can see the calls made via the debug session in your other terminal.
|
|
|
|
|
|
|
|
![List example](/project/images/three_running.png)
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
## Restart a container with your source
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
At this point, you have experienced the "Docker inception" technique. That is,
|
|
|
|
you have:
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
* built a Docker image from the Docker repository
|
|
|
|
* created and started a Docker development container from that image
|
|
|
|
* built a Docker binary inside of your Docker development container
|
|
|
|
* launched a `docker` daemon using your newly compiled binary
|
2015-03-07 08:06:40 -05:00
|
|
|
* called the `docker` client to run a `hello-world` container inside
|
|
|
|
your development container
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
When you really get to developing code though, you'll want to iterate code
|
|
|
|
changes and builds inside the container. For that you need to mount your local
|
|
|
|
Docker repository source into your Docker container. Try that now.
|
|
|
|
|
|
|
|
1. If you haven't already, exit out of BASH shells in your running Docker
|
|
|
|
container.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
If you have followed this guide exactly, exiting out your BASH shells stops
|
|
|
|
the running container. You can use the `docker ps` command to verify the
|
|
|
|
development container is stopped. All of your terminals should be at the
|
|
|
|
local host prompt.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
2. Choose a terminal and make sure you are in your `docker-fork` repository.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ pwd
|
|
|
|
/Users/mary/go/src/github.com/moxiegirl/docker-fork
|
|
|
|
|
|
|
|
Your location will be different because it reflects your environment.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-25 22:30:11 -04:00
|
|
|
3. Create a container using `dry-run-test`, but this time, mount your repository
|
2015-03-24 14:25:26 -04:00
|
|
|
onto the `/go` directory inside the container.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ docker run --privileged --rm -ti -v `pwd`:/go/src/github.com/docker/docker dry-run-test /bin/bash
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
When you pass `pwd`, `docker` resolves it to your current directory.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
4. From inside the container, list your `binary` directory.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
root@074626fc4b43:/go/src/github.com/docker/docker# ls bundles/1.5.0-dev/binary
|
|
|
|
ls: cannot access binary: No such file or directory
|
|
|
|
|
|
|
|
Your `dry-run-test` image does not retain any of the changes you made inside
|
|
|
|
the container. This is the expected behavior for a container.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
5. In a fresh terminal on your local host, change to the `docker-fork` root.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ cd ~/repos/docker-fork/
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-25 22:30:11 -04:00
|
|
|
6. Create a fresh binary, but this time, use the `make` command.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
$ make BINDDIR=. binary
|
|
|
|
|
|
|
|
The `BINDDIR` flag is only necessary on Mac OS X but it won't hurt to pass
|
|
|
|
it on Linux command line. The `make` command, like the `make.sh` script
|
|
|
|
inside the container, reports its progress. When the make succeeds, it
|
|
|
|
returns the location of the new binary.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
7. Back in the terminal running the container, list your `binary` directory.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
root@074626fc4b43:/go/src/github.com/docker/docker# ls bundles/1.5.0-dev/binary
|
|
|
|
docker docker-1.5.0-dev docker-1.5.0-dev.md5 docker-1.5.0-dev.sha256
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
The compiled binaries created from your repository on your local host are
|
|
|
|
now available inside your running Docker development container.
|
|
|
|
|
|
|
|
8. Repeat the steps you ran in the previous procedure.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
* copy the binary inside the development container using
|
|
|
|
`cp bundles/1.5.0-dev/binary/docker /usr/bin`
|
2015-07-22 15:37:17 -04:00
|
|
|
* start `docker daemon -D` to launch the Docker daemon inside the container
|
2015-03-07 08:06:40 -05:00
|
|
|
* run `docker ps` on local host to get the development container's name
|
|
|
|
* connect to your running container `docker exec -it container_name bash`
|
|
|
|
* use the `docker run hello-world` command to create and run a container
|
|
|
|
inside your development container
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
## Where to go next
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
Congratulations, you have successfully achieved Docker inception. At this point,
|
|
|
|
you've set up your development environment and verified almost all the essential
|
|
|
|
processes you need to contribute. Of course, before you start contributing,
|
2015-03-24 14:25:26 -04:00
|
|
|
[you'll need to learn one more piece of the development environment, the test
|
|
|
|
framework](/project/test-and-docs/).
|