Docker
Containers: Docker
- Containers, Dockers, and Kubernetes – Lecture from Raj Jain
- An Introduction to Containers
- LXC vs Docker: Why Docker is Better
- The Docker Handbook – 2021 Edition
- Learn Docker with more hands-on labs
- Docker Tutorial – parte 1
- Docker Tutorial – parte 2
- Docker command line reference
- Docker registry first steps
Docker use cases
- The Business Case for Container Adoption
- Developing With Containers Done Right
- Intro to Docker for Web Developers
- Using Docker to develop a typical web application and deploying it in production
Docker creation
- How to create Docker Images with a Dockerfile
- Intro Guide to Dockerfile Best Practices
- Docker: Use multi-stage builds
Multistage builds are useful to anyone who has struggled to optimize Dockerfiles while keeping them easy to read and maintain. - How to modify the configuration file when the Docker container fails to start normally?
- Microcontainers – Tiny, Portable Docker Containers
- How to Create a Dockerfile for a Python Application
A step-by-step guide to creating a Python container.
Docker operation
- Docker data container: come gestire lo storage dati su Docker
- MANAGING PERSISTENCE FOR DOCKER CONTAINERS
- How to persist data in docker container
- How To Remove Docker Images, Containers, and Volumes
- How to Debug and Fix Common Docker Issues
- How to mount a host directory in a Docker container
- Recovering files from a fudged docker container
- How to mount a host directory in a Docker container
- Recovering files from a fudged docker container
- Running Desktop Apps in Docker
Docker Compose
- Docker Compose overview
- Introduction to Docker Compose
- Deploy a tomcat application using docker-compose
- Best Practices Around Production Ready Web Apps with Docker Compose
Docker Swarm
Docker installation
- How To Install and Use Docker on Ubuntu 22.04
- How To Install and Use Docker on Ubuntu 16.04
- How To Install Docker on Ubuntu 16.04
- Get Docker CE for Ubuntu
- How to install Docker Desktop and enable Kubernetes support
Docker Machine
- Docker Machine Overview
Docker Machine is a tool that lets you install Docker Engine on virtual hosts, and manage the hosts with docker-machine commands. You can use Machine to create Docker hosts on your local Mac or Windows box, on your company network, in your data center, or on cloud providers like Azure, AWS, or Digital Ocean.
Machine was the only way to run Docker on Mac or Windows previous to Docker v1.12. Starting with the beta program and Docker v1.12, Docker Desktop for Mac and Docker Desktop for Windows are available as native apps and the better choice for this use case on newer desktops and laptops. We encourage you to try out these new apps. The installers for Docker Desktop for Mac and Docker Desktop for Windows include Docker Machine, along with Docker Compose. - Docker Desktop for Windows uses Microsoft Hyper-V for virtualization, and Hyper-V is not compatible with Oracle VirtualBox. Therefore, you cannot run the two solutions simultaneously. But you can still use
docker-machine
to create more local VMs by using the Microsoft Hyper-V driver.The prerequisites are:- Have Docker Desktop for Windows installed, and running (which requires that virtualization and Hyper-V are enabled, as described in What to know before you install Docker Desktop for Windows).
- Set up the Hyper-V driver to use an external virtual network switch See the Docker Machine driver for Microsoft Hyper-V topic, which includes an example of how to do this.
Docker: image customization
- Dockerize an SSH service
- SSH into a Docker Container
There are several reasons why you may not want or need to enable SSH on a Docker container. First, you often don’t need to run SSHd in Docker to do stuff you’d normally use SSH for. You can access logs, restart services and browse a container file system with docker attach or docker exec.
Second, it goes against the philosophy of Docker containers. A container should do exactly one thing.
Finally, it may be a security risk. Exposing an additional means of accessing a container certainly increases the attack surface. You may also need to deal with password / key management. - Running SSH in an Alpine Docker Container
- Run multiple services in a container
- Building Minimal Docker Containers for Python Applications
- Putting Bottle in a Container: Docker and Bottle
- SR-IOV in Docker containers
Modification of a service configuration file in a container
- Copy the configuration files in the container to the host:
# Syntax: docker CP < container name / container ID >: < path of configuration file in container > < path to be copied to host > $ docker cp mysql:/etc/mysql/mysql.conf.d/mysqld.cnf ~/mysqld.cnfModify the configuration file in the host. Then copy the modified configuration file back into the container:# Syntax: docker CP < path of configuration file in host > < container name / container ID >: < path of configuration file in container > $ docker cp ~/mysqld.cnf mysql:/etc/mysql/mysql.conf.d/mysqld.cnfRestart the container.
Docker performance
- Analyzing Docker Container Performance With Native Tools
- Measure execution time of docker container
- Simple Container Benchmarks
- Kubernetes Benchmark: Bigstep vs AWS [part 1]
- Docker v/s Rkt Benchmarking: Performance Benchmarks
- Simulate high latency network using Docker containers and “tc” commands
Docker and time
- How to run Docker and get more sleep than I did
- Time in a Docker container
- Will docker container auto sync time with the host machine?
Docker migration
Docker and media streaming
- SysAdm: FFmpeg streaming with Docker-based Network Function
- GStreamer in Docker = overlays not working
I need to stream a video from a server to a client, with a clock overlay. The server must be inside a Docker image. Here is the server command:
gst-launch-1.0 \ v4l2src device=/dev/video0 \ ! videorate ! videoscale \ ! clockoverlay shaded-background=true font-desc="Sans 38" \ ! video/x-raw,format=I420,width=640,height=360,framerate=25/1 \ ! jpegenc ! rtpjpegpay \ ! udpsink host=localhost port=5000
- And here is the client:
gst-launch-1.0 -v \ udpsrc port=5000 \ ! application/x-rtp, encoding-name=JPEG, framerate=25/1 \ ! rtpjpegdepay ! jpegdec ! videoconvert ! ximagesink
- Solution: I just needed to install gstreamer1.0-x as well.
Docker in Windows
- Get started with Docker Machine and a local VM
- Boot2Docker is a lightweight Linux distribution made specifically to run Docker containers. It runs completely from RAM, is a ~45MB download and boots quickly.
Boot2Docker is officially deprecated and unmaintained. It is recommended that users transition from Boot2Docker over to Docker Desktop instead (especially with the new WSL2 backend, which supports Windows 10 Home).
Docker in Windows WSL2
- Docker Desktop WSL 2 backend
- Docker Desktop will not start after Windows 11 update
- Run Docker and VMware at the same time in Windows
- Virtualbox & Docker unable to work in parallel on Windows 11
- Yes, You Can Run Docker AND Virtualbox on Windows 10 Home
- VMWare and Docker on Same Windows 10 PC
- Docker – Cannot enable hypervisor in workstation
- Install Docker on Windows (WSL) without Docker Desktop
- Introduzione ai contenitori Docker remoti in WSL 2
- Permissions and performance issues using Windows 11 + WSL2 (Ubuntu), Docker Desktop & WordPress via docker-compose local environment
Docker container and ARM architectures
When building docker images on an M1, you’ll need to enable an experimental feature and then can build images for both amd64 (x86) and arm64 (M1)
# The usual way on intel docker build ---push -t mbari/polynote:latest .# On Apple Silicon docker buildx build --platform linux/amd64,linux/arm64 --push -t mbari/polynote:latest .
- How to Actually Deploy Docker Images Built on M1 Macs With Apple Silicon
- Come creare immagini Docker x86 (e altre!) Su un Mac M1
- Create docker image on Apple Silicon M1 Mac
- Minio on ARM (Alex Ellis on github)
Minio is an S3 compatible object storage server written in Go. You can store anything you want and it even runs on the Raspberry Pi. I’ve built a special Dockerfile to enable Docker to bring Minio to the Pi and ARM devices. - lakhansamani/docker-demo (GitHub)
This repository is used to demonstrate how you can build linux/amd64 docker images on m1 chip mac books. It is a simple repository demonstrating the Hello World in Golang - Multi-arch build and images, the simple way
“Build once, deploy anywhere” is really nice on the paper but if you want to use ARM targets to reduce your bill, such as Raspberry Pis and AWS A1 instances, or even keep using your old i386 servers, deploying everywhere can become a tricky problem as you need to build your software for these platforms. To fix this problem, Docker introduced the principle of multi-arch builds and we’ll see how to use this and put it into production. - Creating An Alpine Image With Ansible
Useful Docker containers
- juliopdx/netauto
Used to build automation image. - wbitt/network-multitool
Alpine based multi-arch multi-tool for container network troubleshooting. (Formerly owned by Praqma) - prantlf/alpine-make-gcc
Docker image with make, gcc, binutils, autoconf, musl and other tools for compiling packages on Alpine Linux. - A simple docker container with static binaries for capsh, getcap, setcap
This makes it easy to work with capabilities in docker containers.
Available on Docker Hub:
https://hub.docker.com/r/scionproto/docker-caps - Ryu DockerFile
Just a dockerfile to run ryu controller in a container. Uses python 3.8 and alpine. - ergw/ergw-docker-base
This repository contains the Dockerfile to build a base container image to run erlang-applications for erGW. The image is autmatically build in docker hub.