Presented by
Katie Miller / @codemiller
Steve Pousty / @TheSteve0
|
Instantiate a Docker container with docker run
:
$ docker run -i -t nhripps/centos /bin/bash
bash-4.1# exit
exit
List running and exited docker processes with docker ps
:
$ docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS NAMES
7c4ef3596fa5 nhripps/centos:latest "/bin/bash" 49 seconds ago Exited (0) grave_newton
Rejoin containers with docker attach
:
$ docker start grave_newton
grave_newton
$ docker attach grave_newton
bash-4.1# exit
exit
Run a Docker image and perform some actions:
$ docker run -i -t --name="add_wget" nhripps/centos /bin/bash
bash-4.1# yum install -y wget
...
bash-4.1# exit
Run a diff on the container after it has run:
$ docker diff add_wget
C /.bash_history
C /etc
A /etc/wgetrc
C /tmp
C /usr
C /usr/bin
A /usr/bin/wget
C /usr/share
C /usr/share/doc
A /usr/share/doc/wget-1.12
...
A docker container runs until:
docker stop <container_name>
|
PROS:
|
CONS:
|
Presented by
Katie Miller / @codemiller
Steve Pousty / @TheSteve0