Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's new in Docker ?

What's new in Docker ?

It’s the first breakout after the keynote and you need to know more about all the latest and greatest Docker announcements. We've got you covered! In this session, Victor Vieux will go deeper, looking into what's new with Docker, demoing the latest features and answering your questions.

Victor Vieux

April 18, 2017
Tweet

More Decks by Victor Vieux

Other Decks in Technology

Transcript

  1. … -> 1.11 -> 1.12 -> 1.13 -> 17.03-ce ->

    17.04-ce -> 17.05-ce -> … YY.MM “ce” stands for Community Edition as opposed to “ee” for Enterprise Edition New versioning…
  2. …and new release schedule Docker CE Docker EE Monthly Quarterly

    Supported for 4 months Quarterly Supported for 12 months
  3. Multi-Stage builds step 1 step 2 step 3 step 4

    step 1 step 2 step 3 step 4 step 5 step 6 step 7 docker build & Dockerfile improvement 17.05
  4. FROM ubuntu RUN apt-get install make g++ ADD . /src

    RUN cd /src && make EXPOSE 80 ENTRYPOINT /usr/local/bin/app Multi-Stage builds docker build & Dockerfile improvement 17.05
  5. FROM alpine RUN apk add make g++ ADD . /src

    RUN cd /src && make EXPOSE 80 ENTRYPOINT /usr/local/bin/app Multi-Stage builds docker build & Dockerfile improvement 17.05
  6. FROM alpine RUN apk add make g++ ADD . /src

    RUN cd /src && make Multi-Stage builds docker build & Dockerfile improvement FROM busybox ADD ./app /usr/local/bin EXPOSE 80 ENTRYPOINT /usr/local/bin/app Makefile and/or shell script 17.05
  7. FROM alpine AS build-env RUN apk add make g++ ADD

    . /src RUN cd /src && make FROM busybox COPY --from=build-env /src/build/app /usr/local/bin/app EXPOSE 80 ENTRYPOINT /usr/local/bin/app Multi-Stage builds docker build & Dockerfile improvement 17.05
  8. Multi-Stage builds docker build & Dockerfile improvement Let’s see a

    more complicated example: Current Dockerfile: https://github.com/docker/dockercraft Proposed Changes: https://github.com/docker/dockercraft/pull/83 17.05
  9. Multi-Stage builds wget docker wget cuberite go build dockercraft run

    dockercraft docker build & Dockerfile improvement install wget 17.05
  10. Multi-Stage builds wget docker wget cuberite go build dockercraft run

    dockercraft install wget wget docker docker build & Dockerfile improvement wget cuberite run dockercraft go build dockercraft install wget 17.05
  11. Multi-Stage builds docker build & Dockerfile improvement 838MB 155MB final

    image size: final image size: * * 80% comes from debian:jessie, required by cuberite 17.05
  12. • docker build . • docker build --target=cuberite . •

    docker build --target=docker . Specify target on build docker build & Dockerfile improvement 17.05
  13. • docker build . • docker build --build-arg GO_VERSION=latest .

    • docker build --build-arg GO_VERSION=1.7 . ARG in FROM docker build & Dockerfile improvement ARG GO_VERSION=1.8 FROM golang:${GO_VERSION} ADD . /src WORKDIR /src RUN go build CMD [“/bin/app”] 17.05
  14. docker system subcommands added • docker system df • docker

    system prune • docker container/image/network/volume prune Data management commands $ docker system df TYPE TOTAL ACTIVE SIZE RECLAIMABLE Images 5 1 2.777 GB 2.647 GB (95%) Containers 1 1 0 B 0B Local Volumes 4 1 3.207 GB 2.261 GB (70%) 17.03
  15. docker plugin subcommands added Plugins are now managed by the

    docker daemon and run as containers • docker plugin install <plugin> • docker plugin enable/disable <plugin> • docker plugin set <plugin> KEY=value New plugin system 17.03
  16. Plug-ins: Building, Shipping, Storing and Running by Nandhini Santhanam &

    Tibor Vass Tomorrow at 1:30pm in Ballroom D Deep dive session
  17. Synchronous service commands swarm mode improvements $ docker service create

    --detach=false --name redis --replicas 5 redis overall: [====================> ] 2B/5B 1/5: starting [========================================> ] 8B/9B 2/5: starting [========================================> ] 8B/9B 3/5: starting [========================================> ] 8B/9B 4/5: running [=============================================>] 9B/9B 5/5: running [=============================================>] 9B/9B $ 17.05
  18. “rollback” action added to --update-failure-action (in addition to “pause” and

    “continue”) with all the associated flags --rollback-delay --rollback-failure-action --rollback-max-failure-ratio --rollback-monitor --rollback-parallelism Service rollback on failure swarm mode improvements 17.04
  19. rack: SFO-2 rack: SFO-1 Topology-aware scheduling node1 node2 node3 docker

    service create --replicas=6 postgres swarm mode improvements 17.04
  20. docker service create --replicas=6 postgres rack: SFO-2 rack: SFO-1 Topology-aware

    scheduling node1 node2 node3 swarm mode improvements 17.04
  21. docker service create --replicas=6 postgres docker service create --replicas=2 webapp

    rack: SFO-2 rack: SFO-1 Topology-aware scheduling node1 node2 node3 swarm mode improvements 17.04
  22. docker service create --replicas=6 postgres docker service create --replicas=2 webapp

    rack: SFO-2 rack: SFO-1 Topology-aware scheduling node1 node2 node3 swarm mode improvements 17.04
  23. rack: SFO-2 rack: SFO-1 Topology-aware scheduling node1 node2 node3 docker

    service create --replicas=6 --placement-pref-add=rack postgres swarm mode improvements 17.04
  24. docker service create --replicas=6 --placement-pref-add=rack postgres rack: SFO-2 rack: SFO-1

    swarm mode improvements Topology-aware scheduling node1 node2 node3 17.04
  25. docker service create --replicas=6 --placement-pref-add=rack postgres docker service create --replicas=2

    --placement-pref-add=rack webapp rack: SFO-2 rack: SFO-1 swarm mode improvements Topology-aware scheduling node1 node2 node3 17.04
  26. rack: SFO-2 rack: SFO-1 swarm mode improvements Topology-aware scheduling node1

    node2 node3 docker service create --replicas=6 --placement-pref-add=rack postgres docker service create --replicas=2 --placement-pref-add=rack webapp 17.04
  27. Service logs swarm mode improvements $ docker service create --replicas

    2 --name redis redis $ docker service logs redis redis.2.najk8sq1klac@node2 | _.-``__ ''-._ redis.2.najk8sq1klac@node2 | _.-`` `. `_. ''-._ Redis 3.2.8 (00000000/0) 64 bit redis.1.lfkijq3fx3q8@node1 | _.-``__ ''-._ redis.2.najk8sq1klac@node2 | .-`` .-```. ```\/ _.,_ ''-._ redis.1.lfkijq3fx3q8@node1 | _.-`` `. `_. ''-._ Redis 3.2.8 (00000000/0) 64 bit redis.2.najk8sq1klac@node2 | ( ' , .-` | `, ) Running in standalone mode redis.1.lfkijq3fx3q8@node1 | .-`` .-```. ```\/ _.,_ ''-._ redis.2.najk8sq1klac@node2 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 redis.1.lfkijq3fx3q8@node1 | ( ' , .-` | `, ) Running in standalone mode redis.2.najk8sq1klac@node2 | | `-._ `._ / _.-' | PID: 1 redis.1.lfkijq3fx3q8@node1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 redis.2.najk8sq1klac@node2 | `-._ `-._ `-./ _.-' _.-' redis.1.lfkijq3fx3q8@node1 | | `-._ `._ / _.-' | PID: 1 ... 17.05
  28. Under the Hood with Docker Swarm Mode by Drew Erny

    & Nishant Totla Today at 2:00pm in Ballroom D Deep dive session
  29. docker stack subcommands added It is now possible to deploy

    services using compose files directly from docker • docker stack deploy --compose-file docker-compose.yml <my_stack> • docker stack list • docker stack rm <my_stack> Compose to Swarm 17.03
  30. docker-compose.yml improvements Main differences form v2 are: • Removed the

    non-portable options • build • volume-from • … • Added Swarm specific options • replicas • mode • … Compose Format version 3 17.03
  31. ports: - 3000 - 3000-3005 - 49100:22 - 9090-9091:8080-8081 -

    127.0.0.1:8001:8001 - 127.0.0.1:5005-5010:5005-5010 - 6060:7060/udp Long syntax for ports docker-compose.yml improvements 17.04
  32. ports: - target: 6060 published: 7060 protocol: udp Long syntax

    for ports docker-compose.yml improvements 17.04 Also added specific swarm mode options
  33. volumes: - /var/lib/mysql - /opt/data:/var/lib/mysql - ./cache:/tmp/cache - datavolume:/var/lib/mysql -

    ~/configs:/etc/configs/:ro Long syntax for volumes docker-compose.yml improvements 17.04
  34. volumes: - type: bind source: ~/configs target: /etc/configs read_only: true

    Long syntax for volumes docker-compose.yml improvements 17.04 Also added specific swarm mode options