Last active
April 14, 2017 23:18
-
-
Save gavinengel/740ae7b4ea02e9c526f0 to your computer and use it in GitHub Desktop.
Docker notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# productive Docker host? | |
1. https://coreos.com/os/docs/latest/booting-on-ec2.html and select HVM AMI | |
2. create single node (open TCP and UDP all) | |
3. ssh into node | |
4. install Rancher, see below | |
### | |
# ubuntu ... | |
sudo apt-get -y install docker.io; | |
# ...or rhel... | |
sudo yum -y install docker docker-registry; | |
sudo systemctl start docker.service; | |
# ...or Fedora | |
sudo yum install docker-engine; | |
sudo systemctl start docker.service; | |
sudo docker pull ubuntu; | |
sudo docker pull centos; | |
sudo docker pull node; | |
sudo docker pull wordpress; | |
# Rancher Admin | |
docker run -d --restart=always -p 8080:8080 rancher/server | |
* first set local admin password | |
* second setup 'host' as the same address, add 'custom' host and paste command in via ssh | |
# Shipyard: Docker Webmin | |
# first: sudo bash, then: | |
curl -sSL https://shipyard-project.com/deploy | PORT=12121 bash -s; # Install | |
curl -sSL https://shipyard-project.com/deploy | ACTION=remove bash -s; # Remove | |
# Shipyard available at http://localhost:12121 | |
# Username: admin Password: shipyard | |
# DockerUI | |
docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock uifd/ui-for-docker | |
# Simple Docker UI: Chrome Docker Admin | |
https://chrome.google.com/webstore/detail/simple-docker-ui/jfaelnolkgonnjdlkfokjadedkacbnib/related?hl=en | |
* can be used to pull images | |
* cannot be used to create new containers | |
# Dockery Light | |
https://chrome.google.com/webstore/detail/dockery-light/cefhojablgaokgccloekpocgmffgecmm?hl=en | |
* Chrome Extensions is not maintained | |
# Portainer | |
http://portainer.io | |
# makes it quicker to ssh into a container; to see container name use: docker ps | |
dssh () { sudo docker exec -i -t "$@" bash; } | |
# interesting images: | |
centurylink/panamax-api | |
tutum/lamp | |
linode/lamp | |
castawaylabs/lamp-docker | |
drupal | |
https://hub.docker.com/r/strongloop/ | |
# commands | |
docker rm --force `docker ps -qa`; # remove ALL containers | |
# minimal node container | |
docker run -i -t -h test.example.com --name somenodecontainer -m 256M mhart/alpine-node /bin/sh; # create container from image `mhart/alpine-node` | |
# container-to-container networking | |
* within each container, cat /etc/hosts to see hostname & ipaddress | |
* use docker link within coreos ssh, to insert entries into containers' /etc/hosts for their neighbors | |
# docker run -dit ubuntu; # create a long running container with a random name. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment