Skip to content

Instantly share code, notes, and snippets.

@russmckendrick
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russmckendrick/9020597 to your computer and use it in GitHub Desktop.
Save russmckendrick/9020597 to your computer and use it in GitHub Desktop.
Docker Installation & Notes

Docker Notes

Installation

this assumes a clean installation of CentOS 6.5

yum install http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum -y install docker-io
service docker start
chkconfig docker on

Import images & test

docker pull russmckendrick/docker-centos
docker run russmckendrick/docker-centos:6.5 /bin/echo hello world

Common Commands

docker info # Get some information on the installation
docker images # List the available images
docker ps # Whats running?
docker search [TERM] # Search for images

Launching

CONTAINER_ID=$(docker run -d -i -t russmckendrick/docker-centos:6.5 /bin/bash)
docker ps
docker attach -sig-proxy=false $CONTAINER_ID
docker logs $CONTAINER_ID
docker stop $CONTAINER_ID

Further reading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment