Avril 2018 container training from Jérôme Petazzoni¶
See also
- Intro Avril 2018
- Overview
- A brief introduction
- About these slides
- Docker 30,000ft overview
- OK… Why the buzz around containers ?
- Deployment becomes very complex
- Results
- Escape dependency hell
- On-board developers and contributors rapidly
- Implement reliable CI easily
- Use container images as build artefacts
- Decouple “plumbing” from application logic
- Formats and APIs, before Docker
- Formats and APIs, after Docker
- Shipping, before Docker
- Shipping, after Docker
- Example
- Devs vs Ops, before Docker
- Devs vs Ops, after Docker
- History of containers … and Docker
- First experimentations
- The VPS age (until 2007-2008)
- Containers = cheaper than VMs
- The PAAS period (2008-2013)
- Containers = easier than VMs
- First public release of Docker
- Docker early days (2013-2014)
- First users of Docker
- Positive feedback loop
- Maturity (2015-2016)
- Docker becomes an industry standard
- Docker becomes a platform
- Overview
- Chapter1 Avril 2018
- Chapter2 Avril 2018 container training
- Our first containers
- Backgroud containers
- Objectives
- A non-interactive container
- Run a container in the background
- List running containers
- View only the IDs of the containers
- Combining flags
- View the logs of a container
- View only the tail of the logs
- Follow the logs in real time
- Stop our container
- Stopping our containers
- Killing the remaining containers
- Restarting and attaching to containers
- Understanding Docker images
- Objectives
- What is an image ?
- Differences between containers and images
- Object-oriented programming
- Wait a minute
- Creating the first images
- Creating other images
- Images namespaces
- Root namespace
- User namespace
- Self-Hosted namespace
- How do you store and manage images ?
- Showing current images
- Searching for images
- Downloading images
- Pulling an image
- Image and tags
- When to (not) use tags
- Section summary
- Chapter3 Avril 2018
- Building images interactively
- Building Docker images with a Dockerfile
- Objectives
- Dockerfile overview
- Writing our first Dockerfile
- Type this into our Dockerfile…
- Build it!
- What happens when we build the image ?
- Sending the build context to Docker
- Executing each step
- The caching system
- Running the image
- Using image and viewing history
- Introducing JSON syntax
- JSON syntax vs string syntax
- When to use JSON syntax and string syntax
- CMD and ENTRYPOINT
- Objectives
- Defining a default command
- Adding CMD to our Dockerfile
- Build and test our image
- Overriding CMD
- Using ENTRYPOINT
- Adding ENTRYPOINT to our Dockerfile
- Implications of JSON vs string syntax
- Build and test our image
- Using CMD and ENTRYPOINT together
- CMD and ENTRYPOINT together
- Build and test our image
- Overriding the image default parameters
- Overriding ENTRYPOINT
- Copying files during the build
- Multi-stage builds
- Publishing images to the Docker Hub
- Tips for efficient Dockerfiles
- Chapter4 Avril 2018
- Naming and inspecting containers
- Naming and inspecting containers
- Getting inside a container
- Objectives
- Getting a shell
- Not getting a shell
- Viewing container processes from the host
- What’s the difference between a container process and a host process ?
- Getting a shell in a running container
- Caveats
- Getting a shell in a stopped container
- Analyzing a stopped container
- Viewing filesystem changes
- Accessing files
- Exploring a crashed container (docker commit + docker run –ti –entrypoint)
- Obtaining a complete dump (docker export)
- Container networking basics
- Container network drivers
- Container network model
- Service discovery with containers
- Ambassadors
- Chapter5 Avril 2018
- Local development workflow with Docker
- Working with volumes
- Objectives
- Working with volumes
- Volumes are special directories in a container
- Volumes bypass the copy-on-write system
- Volumes can be shared across containers
- Sharing app server logs with another container
- Volumes exist independently of containers
- Naming volumes
- Using our named volumes
- Using a volume in another container
- Managing volumes explicitly
- Migrating data with –volumes-from
- Data migration in practice
- Upgrading Redis
- Testing the new Redis
- Volumes lifecycle
- Checking volumes defined by an image
- Checking volumes used by a container
- Sharing a single file
- Volume plugins
- Volumes vs. Mounts
- –mount syntax
- Section summary
- Compose for development stacks
- Compose for development stacks
- What is Docker Compose ?
- Compose overview
- Checking if Compose is installed
- Launching Our First Stack with Compose
- Launching Our First Stack with Compose
- Stopping the app
- The docker-compose.yml file
- Compose file versions
- Containers in docker-compose.yml
- Container parameters
- Compose commands
- Check container status
- Cleaning up (1)
- Cleaning up (2)
- Special handling of volumes
- Compose project name
- Running two copies of the same app
- Managing hosts with Docker Machine
- Chapter6 Avril 2018
- Chapter7 Avril 2018
- Chapter8 Avril 2018