Anonymous
×
Create a new article
Write your page title here:
We currently have 27 articles on PhenixOps. Type your article name above or click on one of the titles below and start writing!



PhenixOps
27Articles

Docker: Difference between revisions

Line 50: Line 50:
Stop the container <br>
Stop the container <br>
<code>
<code>
docker stop web01
docker stop ''image''
</code> <br>
 
Start the container <br>
<code>
docker stop ''image''
</code> <br>
</code> <br>


Line 68: Line 73:
docker pull hello-world
docker pull hello-world
docker run hello-world
docker run hello-world
</code> <br>
Stop Hello World <br>
<code>
docker stop hello-world
</code> <br>
</code> <br>


Line 95: Line 105:
<code>
<code>
curl localhost
curl localhost
</code> <br>
Stop the container <br>
<code>
docker stop web01
</code> <br>
</code> <br>


Line 101: Line 116:
docker rm web01
docker rm web01
</code> <br>
</code> <br>
== Docker Adding Storage ==
<br>
<code>
docker rm
</code> <br>
<br>
<code>
docker
</code> <br>
<br>
<code>
docker
</code> <br>
<br>
<code>
docker
</code> <br>
llll
<br>
<code>
docker
</code> <br>


=== Comments ===
=== Comments ===

Revision as of 20:50, 24 April 2020

Docker First Steps

Installation

apt-get install -y apt-transport-https ca-certificates surl software-properties-common

If needed import the docker repo
apt-get update

Install Docker
apt-get install docker-ce

Useful commands

Information
docker info

Check Version of client and server
docker version

Search images (usually from hub.docker.com)
docker search image

Get images you want to run
docker pull image

Show the images
docker image

Run an image in a container
docke run image

Stop the container
docker stop image

Start the container
docker stop image

Remove the image
docker rm image

Hello world example

Search images
docker search image

Run Hello World (Shows a Hello World message on the commandline)
docker pull hello-world docker run hello-world

Stop Hello World
docker stop hello-world

Get rid of it
docker rm hello-world

HTTPD Example

Run httpd webserver
docker pull httpd docker run httpd

Run http and expose it to the outside world (-p container:host)
docker run -p 80:80 --name web01 -d httpd

Show running containers
docker ps

Get stuff from the webserver
curl localhost

Stop the container
docker stop web01

Remove the container
docker rm web01

Docker Adding Storage


docker rm


docker


docker


docker
llll


docker



Comments