Experimentation with Docker!!

Something very rudimentary!! Doing it on Fedora 20…

 

sudo docker run -i -t ubuntu /bin/bash
Unable to find image ‘ubuntu’ locally
Pulling repository ubuntu
c4ff7513909d: Pulling image (latest) from ubuntu, endpoint: https://registry-1.docker.io/v1/

 

 sudo docker run -i -t ubuntu /bin/bash
Unable to find image ‘ubuntu’ locally
Pulling repository ubuntu
c4ff7513909d: Download complete
511136ea3c5a: Download complete
1c9383292a8f: Download complete
9942dd43ff21: Download complete
d92c3c92fa73: Download complete
0ea0d582fd90: Download complete
cc58e55aa5a5: Download complete
root@0ca15a2562d2:/#

 

 

sudo usermod -a -G docker $USER

 

docker ps -a
2014/09/03 10:34:00 Get http:///var/run/docker.sock/v1.13/containers/json?all=1: dial unix /var/run/docker.sock: permission denied
bchowdhury@LAP-02-1755_10:34:00_Wed Sep 03:~> sudo !!
sudo docker ps -a
CONTAINER ID        IMAGE                               COMMAND                CREATED             STATUS                      PORTS                     NAMES
0ca15a2562d2        ubuntu:latest                       /bin/bash              4 minutes ago       Exited (0) 18 seconds ago                             suspicious_ardinghelli   
55ff2eb67efa        openshift/centos-rockmongo:latest   /usr/sbin/httpd -D F   7 weeks ago         Exited (0) 7 weeks ago                                rockmongo-1              
e35bc98b4e54        openshift/centos-rockmongo:latest   /bin/true /usr/sbin/   7 weeks ago         Exited (0) 7 weeks ago                                rockmongo-1-data         
105ebab5aea8        openshift/centos-mongodb:latest     /usr/bin/mongod –co   7 weeks ago         Up 9 minutes                0.0.0.0:4000->27017/tcp   mongodb-1                
bf3bfb0340c6        openshift/centos-mongodb:latest     /bin/true /usr/bin/m   7 weeks ago         Exited (0) 7 weeks ago                                mongodb-1-data

 

sudo docker rm 55ff2eb67efa
55ff2eb67efa

 

 sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
0ca15a2562d2        ubuntu:latest       /bin/bash           7 minutes ago       Exited (0) 2 minutes ago                       suspicious_ardinghelli  

 

sudo docker ps -l
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
0ca15a2562d2        ubuntu:latest       /bin/bash           7 minutes ago       Exited (0) 3 minutes ago                       suspicious_ardinghelli

 

sudo docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu                       latest              c4ff7513909d        3 weeks ago         213 MB
openshift/centos-mongodb     latest              b3da2228dc84        3 months ago        744 MB
openshift/centos-rockmongo   latest              0e2207bb1643        3 months ago        596.7 MB

 

sudo docker rmi b3da2228dc84
Untagged: openshift/centos-mongodb:latest
Deleted: b3da2228dc846dafe8718fdad94449dd2a133f17e50e445b07f9c13aac579eb0
Deleted: b570ddbe86f1bf14051412cbf710b7f8d57f1b5ecf37f5121563b94dc31b8b75
Deleted: dce232c3029e693ce84d390de54cdaa2536a2b43a1885c4630e12ebd1bff6ed0
Deleted: 612756b4e936116cd24613db2f5e142a7d0b088749f8dab0e512e5636eaa7ca4
Deleted: d82ac5fe3751f0f5cd23decb2c79adb2d5ef34fc02f215df2d3dc47fe99e9931
Deleted: ac66670e7e67e5e553335c376e58d4c794ac716758baa0c6ccd89794280d1a02
Deleted: 78158d78b8677da9da19fd367ae19978c1ef46c2cb1775e23eb43f6ca20cf98c
Deleted: fd76af8d14398b341bad403a7fcb042270f537dd41908fb7384e530f5d2a9c53

 

 

sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              latest              c4ff7513909d        3 weeks ago         213 MB

 

Cross check this wonderful article :

http://xmodulo.com/2014/05/docker-containers-centos-fedora.html

 

Hope this will help.

 

Cheers!

Bhaskar

About unixbhaskar
GNU/Linux Consultant

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: