Difference between revisions of "Docker basics"

From Notes_Wiki
m
m
Line 15: Line 15:
     docker images
     docker images
</pre>
</pre>
Docker basics are learned from https://docs.docker.com/linux/started/
==Download public docker images==
Public docker images are available at https://hub.docker.com/  They can be downloaded using:
<pre>
docker pull centos
</pre>
Then the same image can be used using:
<pre>
docker run -it centos bash
</pre>
Most images have documentation explaining their purpose and how to use them.
==Listing currently running docker containers==
To list currently running docker containers use:
<pre>
docker ps
</pre>
Read "man docker" for more information on docker command






Docker basics are learned from https://docs.docker.com/linux/started/





Revision as of 06:32, 23 August 2015

<yambe:breadcrumb>Docker|Docker</yambe:breadcrumb>

Docker basics

Run a docker image

To run a docker image use

    docker run hello-world

Docker first searches for image locally. If it is not found then it will download the image from docker hub and run it.


See local docker images in cache

To see local docker images in cache use:

    docker images

Docker basics are learned from https://docs.docker.com/linux/started/


Download public docker images

Public docker images are available at https://hub.docker.com/ They can be downloaded using:

docker pull centos

Then the same image can be used using:

docker run -it centos bash

Most images have documentation explaining their purpose and how to use them.


Listing currently running docker containers

To list currently running docker containers use:

docker ps

Read "man docker" for more information on docker command





<yambe:breadcrumb>Docker|Docker</yambe:breadcrumb>