The whole Docker ecosystem exists today because of every single developer who found ways of using Docker to improve how they build software; whether streamlining production deployments, speeding up continuous integration systems or standing up an application on your laptop to hack on. In this talk we want to take a step back and look at where Docker sits today from the software developers point of view - and then jump ahead and talk about where it might go in the future. In this talk, we’ll discuss:
* Making Docker an everyday part of the developing software on the desktop, with Docker for Windows and Docker for Mac
* Docker Compose, and the future of describing applications as code
* How Docker provides the best tools for developing applications destined to run on any Kubernetes cluster
This session should be of interest to anyone who writes software; from people who want to hack on a few personal projects, to polyglot open source programmers and to professional developers working in tightly controlled environments. Everyone deserves a better developer experience.
2. - Using Docker on your desktop
- Building Docker images
- Describing applications in code
- Using IDE’s with Docker
- Graphical tools for creating applications
This Talk
3. What Do We Mean By Developers?
Enterprise
software
developers
Data
scientists
Front-end engineers
Systems
admins
Students
Professional developers Hobbyists
Lots moreSRE
IOT
6. - Avoid “works on my machine”
Fix issues locally, before they hit production
- Improve productivity
Lots of tools already built for Docker
- Speed up project onboarding
Start with just a Compose file and Docker Desktop
Docker On Your Desktop
7. - Lightweight managed virtual machine
Small overhead and stays out of your way
- File system optimisations
Lots of work on improving performance for shared folders
- Native networking
Access services on localhost with no fuss
Optimised For Developers
11. Dockerfile!
# Use an official Python runtime as a parent image
FROM python:2.7-slim
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
ADD . /app
# Install any needed packages specified in requirements.txt
RUN pip install --trusted-host pypi.python.org -r requirements.txt
# Make port 80 available to the world outside this container
EXPOSE 80
# Run app.py when the container launches
CMD ["python", "app.py"]
12. - Simple text format
Include alongside your source code in version control
- One way of packaging any app
Works for any language or framework
- Already familiar to lots of developers
Run commands you already know
Why Dockerfile?
13. Dockerfile to Docker Image
$ docker build -t friendlyhello .
$ docker image ls
REPOSITORY TAG IMAGE ID
friendlyhello latest 326387cea398
16. Multi-stage Builds!
FROM golang:1.7.3
WORKDIR /go/src/github.com/alexellis/href-counter/
RUN go get -d -v golang.org/x/net/html
COPY app.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=0 /go/src/github.com/alexellis/href-counter/app .
CMD ["./app"]
19. - Faster builds
- Garbage collection of build artefacts
- Parallel builds of multiple images
- Remote cache support
- Custom Dockerfile syntax
- Entire new build frontends
Things to Look Forward to With BuildKit
23. Run Services Described in Compose
$ docker-compose up
djangosample_db_1 is up-to-date
Creating djangosample_web_1 ...
Creating djangosample_web_1 ... done
Attaching to djangosample_db_1, djangosample_web_1
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default datweb_1 | May 30, 2017 - 21:44:49
db_1 | The default text search configuration will be set to "english".
web_1 | Django version 1.11.1, using settings 'composeexample.settings'
web_1 | Starting development server at http://0.0.0.0:8000/
web_1 | Quit the server with CONTROL-C.abase encoding has accordingly been set to "UTF8".
24. - Simple text format
Include alongside your source code in version control
- Most applications consist of multiple services
Microservices or even just a supporting database
- One command to start all dependencies
Get up and running with a new application quickly
Why Compose Files?
25. Compose Works on Kubernetes
$ docker stack deploy --compose-file words.yaml words
Stack words was created
Waiting for the stack to be stable and running...
- Service db has one container running
- Service words has one container running
- Service web has one container running
Stack words is stable and running
26. Custom API Server Adds Stack
$ kubectl get deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
db 1 1 1 1 2m
web 1 1 1 1 2m
words 5 5 5 5 2m
27. - A higher level description
Optimised for a very common use cases
- Maintain less code
Less verbose than the raw API
- Portability
Usable with Swarm, Kubernetes or just the engine
Why Compose on Kubernetes?
29. - Hard to create reusable Compose files
Most reuse is via copy and paste
- No clear interface between dev and ops
Hard to separate different concerns in one file
- No central place to share Compose applications
Docker images are shared via a repository like Hub
Areas to Improve
30. Experiment: Application Packages
Docker Application
Package
Compose file
Metadata
Settings
Shareable
applications with
clear interfaces
for operators
Run multiple
versions of the
same application
Work with Swarm,
Kubernetes
and Helm
Per-environment
settings
39. - Experimental
Tell us what you think
- Standalone utility (for now)
Allow us to move quickly and break things
- Open source
Have an idea? Come and hack on the code with us
Current Status
42. Most Popular Editors
34.9% Visual Studio Code
Developer Survey 2018
34.3% Visual Studio
34.2% Notepad++
28.9% Sublime Text
25.8% Vim
24.9% IntelliJ
52. - Collaboration and sharing
Share templates and services with your team
- Deployment and CI integration
Integrate with CI/CD systems and deploy to EE
- More features
Support for Volumes, Secrets and Networks, Content
Trust and creation of application packages
Coming Next
53. Sign up for the private beta at beta.docker.com
Interested?
56. - Docker Desktop
A fast and stable platform to develop applications on
- Images and Applications
Better, and higher-level, tools to increase productivity
- User interfaces
CLI, IDE and GUI based tools to cover all developers
It’s All About Developers
57. Next steps
Join us on
Docker Community
Download
Docker Desktop
Try out docker-
app