Line 28: | Line 28: | ||
docker version | docker version | ||
</code> <br> | </code> <br> | ||
Search images (usually from hub.docker.com) <br> | Search images (usually from hub.docker.com) <br> | ||
Line 60: | Line 59: | ||
docker run hello-world | docker run hello-world | ||
</code> <br> | </code> <br> | ||
Run httpd webserver <br> | Run httpd webserver <br> |
Revision as of 19:33, 24 April 2020
Other stuff and work in progress that does not have it's own section yet
Docker
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
docke run image
Search images
docker search image
Run Hello World (Shows a Hello World message on the commandline)
docker pull hello-world
docker run hello-world
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