Skip to content

Instantly share code, notes, and snippets.

@pommi
Created December 13, 2013 15:38
Show Gist options
  • Save pommi/7946094 to your computer and use it in GitHub Desktop.
Save pommi/7946094 to your computer and use it in GitHub Desktop.
Pull a PostgreSQL container from the Docker Index and start it
root@host:~# docker pull zaiste/postgresql
Pulling repository zaiste/postgresql
0e66fd3d6a6f: Download complete
27cf78414709: Download complete
...
046559147c70: Download complete
root@host:~# docker run -d zaiste/postgresql
9ba56a7c4bb132ef0080795294a077adca46eaca5738b192d2ead90c16ac2df2
root@host:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9ba56a7c4bb1 zaiste/postgresql:latest /bin/su postgres -c 22 seconds ago Up 21 seconds 5432/tcp jolly_darwin
bd7964940dfc mendix/mendix:latest /bin/su mendix -c /u 30 seconds ago Up 29 seconds 5000/tcp, 7000/tcp tender_hawkings
root@host:~# docker inspect 9ba56a7c4bb1 | grep IPAddress | awk '{ print $2 }' | tr -d ',"'
172.17.0.4
root@host:~#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment