Skip to content

Instantly share code, notes, and snippets.

@mcgarrigle
Last active June 24, 2022 13:35
Show Gist options
  • Save mcgarrigle/effefeb8585a892d903988979c5f658b to your computer and use it in GitHub Desktop.
Save mcgarrigle/effefeb8585a892d903988979c5f658b to your computer and use it in GitHub Desktop.
Docker cribsheet
Install
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce docker-ce-cli containerd.io
systemctl enable docker --now
Image
docker pull centos
docker pull oraclelinux:7.3
Start
docker run -d -t --mount type=bind,source=/root,target=/root oraclelinux:7.3
Connect
docker exec -i -t {container} /bin/bash -l
Debug Mesh Network
docker network inspect -f '{{range .Containers}}{{.Name}} {{end}}' test_default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment