docker
Web UI
https://documentation.portainer.io/v2.0/deploy/ceinstalldocker/
Scripts
Dockerfile code snippets
CMD and ENTRYPOINT
https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact
apt
alpine
tini
https://github.com/krallin/tini
S6 - a process supervisor
https://github.com/just-containers/s6-overlay
badger
https://microbadger.com
Storage
https://docs.docker.com/storage/storagedriver/select-storage-driver/#docker-engine---community
http://jpetazzo.github.io/assets/2015-06-04-deep-dive-into-docker-storage-drivers.html#80
btrfs issue
https://gist.github.com/hopeseekr/cd2058e71d01deca5bae9f4e5a555440
Network
none/bridge/host/overlay/{belows}: https://docs.docker.com/network/
macvlan/ipvlan
https://hicu.be/macvlan-vs-ipvlan
Ipvlan:All sub-interfaces share parent’s MAC | vs Macvlan
Ipvlan L3 mode:Each sub-interface has to be configured with a different subnet
Macvlan and ipvlan cannot be used on the same parent interface at the same time.
https://docs.docker.com/network/ipvlan/
IPvlan L2 mode trunking is the same as Macvlan with regard to gateways and L2 path isolation.
--internal
: ( off-o parent=
)if no
--gateway
: gw for--subnet=192.168.1.0/24
will be 192.168.1.1
To access host, check /nw/openwrt
plugins
https://docs.docker.com/engine/extend/plugins_services/#network-plugins
DHCP
https://github.com/homeall/dhcphelper
https://github.com/modem7/DHCP-Relay
Commands
build
https://docs.docker.com/engine/reference/commandline/build/
Build Syntax Suffix | Commit Used | Build Context Used |
---|---|---|
myrepo.git#mytag:myfolder | refs/tags/mytag | /myfolder |
myrepo.git#mybranch:myfolder | refs/heads/mybranch | /myfolder |
Squashing does not destroy any existing image, rather it creates a new image.
container/image operations
cp
https://docs.docker.com/engine/reference/commandline/cp/
run
https://docs.docker.com/engine/reference/run/ https://docs.docker.com/engine/admin/resource_constraints/
X11 Forwarding
http://wiki.ros.org/docker/Tutorials/GUI https://people.ece.cornell.edu/skand/post/x-forwarding-on-docker/
container update
https://docs.docker.com/engine/reference/commandline/container_update/
docker container update [OPTIONS] CONTAINER [CONTAINER...] --cpus="1.5" # one and a half of the CPUs --cpu-shares , -c --memory , -m Memory limit --memory-reservation Memory soft limit --restart
Clean up
Detach
Config
https://docs.docker.com/engine/reference/commandline/dockerd//#daemon-configuration-file
Mirrors
CN: https://yeasy.gitbook.io/docker_practice/install/mirror LAN: https://docs.docker.com/registry/configuration/#proxy
Proxy
23.0+ : https://docs.docker.com/reference/cli/dockerd/#proxy-configuration
daemon configuration file : /etc/docker/daemon.json
command-line options : https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config
https://docs.docker.com/config/daemon/proxy/#environment-variables
Swarm
TCP port 2377 for cluster management communications TCP and UDP port 7946 for communication among nodes TCP and UDP port 4789 for overlay network traffic --opt encrypted => protocol 50 (ESP) is open
https://docs.docker.com/engine/swarm/admin_guide/#/add-manager-nodes-for-fault-tolerance
https://docs.docker.com/engine/reference/commandline/service_create/
OS
CoreOS
https://coreos.com/releases/
boot2docker
https://github.com/boot2docker/boot2docker Lightweight Linux for Docker
Windows/Mac
https://docs.docker.com/engine/installation/windows/ https://docs.docker.com/machine/drivers/ https://forums.docker.com/t/how-can-i-ssh-into-the-betas-mobylinuxvm/10991/
Automated builds
Docker Hub | $5+/m: https://www.docker.com/pricing/ Github Actions | 2k min/m: https://docs.docker.com/ci-cd/github-actions/ Jetbrains Space |
https://www.jetbrains.com/help/space/docker.html#publish-a-docker-image-to-docker-hub
Last updated