Docker Meetup with AWS Elastic Beanstalk - @docker– 05/06/2014
What’s new in the latest Docker
release and Docker Hub
Victor Vieux, Docker Inc.
@vieux
Slide 2
Slide 2 text
Some numbers
Date
06/09/2014
07/24/2014
Docker
version
1.0
1.1.2
#
of
pulls
2,943,991
5,907,724
+100%
#
of
pushes
105,663
169,589
+60%
#
of
repositories
15,437
23,345
+50%
Slide 3
Slide 3 text
What’s new in the
Docker Engine ?
Slide 4
Slide 4 text
We finally moved
dotcloud/docker => docker/docker
Slide 5
Slide 5 text
docker pause & docker unpause
• We added the ability to pause a container
(freeze the process inside it).
• So it’s now safe to commit a running
container because it’ll be paused
automatically.
Slide 6
Slide 6 text
Networking strategies
• --net=bridge : default behavior, the container gets
an IP on a bridge shared by all the containers
Slide 7
Slide 7 text
Networking strategies
• --net=host : the container access the host interfaces
directly
Slide 8
Slide 8 text
docker run --net=container:c1 ubuntu sh \
-c “echo test | nc 127.0.0.1 80”
Networking strategies
• --net=container: : share the
network stack of another container
docker run --name c1 ubuntu nc –l 127.0.0.1 80
Slide 9
Slide 9 text
Networking strategies
• --net=none : disable networking completely, the
container only gets a loopback interface.
https://docs.docker.com/reference/run/#network-settings
Slide 10
Slide 10 text
.dockerignore
• Exclude some directories when sending
the context the daemon during a build
• For example most of the time you could
add the .git folder to the .dockerignore
https://docs.docker.com/reference/builder/#dockerignore
Slide 11
Slide 11 text
COPY instruction
• ADD without download and untar
• Please use COPY if it’s only what you
need!
https://docs.docker.com/reference/builder/#copy
Slide 12
Slide 12 text
..and tons of other improvements!
• Overall performance and stability
• Logs tailing with docker logs --tail
• Ability to bind mount your whole host fs into a container:
docker run –v /:/some/path
• Filter client output with docker image –filter
• --force-rm to remove containers, even after a fail build.
• Testing framework and code coverage
https://github.com/docker/docker/blob/master/CHANGELOG.md
Slide 13
Slide 13 text
What’s new in the
Docker Hub?
Slide 14
Slide 14 text
Organizations and groups
Slide 15
Slide 15 text
Organizations and groups
Slide 16
Slide 16 text
Bitbucket support (hg and git)
Slide 17
Slide 17 text
Private repositories and private
automated builds
One free private repository
when you sign up at http://hub.docker.com
Slide 18
Slide 18 text
Official repositories
Slide 19
Slide 19 text
The console
Slide 20
Slide 20 text
The console
Slide 21
Slide 21 text
The console
Slide 22
Slide 22 text
What’s next in the
Docker Engine?
Slide 23
Slide 23 text
Fine grain control over capabilities
• Docker defines a whitelist of capabilities,
all the other are dropped.
• --privileged was introduced to grant
access to all the capabilities.
• In the release we will introduce --cap-add
and --cap-drop
Slide 24
Slide 24 text
--cap-add/--cap-drop examples
• Change the status of the container’s
interfaces:
• Prevent any chown in the container:
• Allow all capabilities but mknod:
docker run --cap-add=NET_ADMIN ubuntu sh –c “ip link eth0 down”
docker run --cap-drop=CAP_CHOWN ...
docker run --cap-add=ALL --cap-drop=MKNOD ...
Slide 25
Slide 25 text
Adding host devices to a container
• You could use add devices by using a bind
mount and --privileged .
• In the next release we will introduce
the --device flag.
• To use your sound card without requiring
privileged mode:
docker run --device=/dev/snd:/dev/snd ...
Slide 26
Slide 26 text
Remote volumes
• docker run -v /host/path:/container/path on
a remote machine, like OSX &
boot2docker!
• At first using fuse, but could be another
“driver” later.
https://github.com/bradfitz/docker/tree/fuse