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

Other: Difference between revisions

No edit summary
Line 1: Line 1:
== Other stuff and work in progress that does not have it's own section yet ==
== Other stuff and work in progress that does not have it's own section yet ==
=== Docker ===
== Docker ==
------
------
=== Installation ===
<code>
apt-get install -y apt-transport-https ca-certificates surl software-properties-commn
</code>
If needed import the docker repo
<code>
apt-get update
</code>
Install Docker
<code>
apt-get install docker-ce
</code>
=== Useful commands ===
Information
<code>
docket info
</code>
Check Version of client and server
<code>
docker version
</code>
Search images (usually from hub.docker.com)
<code>
docker search ''image''
</code
Get images you want to run
<code>
docker pull ''image''
</code>
Show the images
<code>
docker image
</code>
Run an image
<code>
docke run ''image''
</code>
Search images
<code>
docker search ''image''
</code>
Run Hello World (Shows a Hello World message on the commandline)
<code>
docker pull hello-world
docker run hello-world
</code>
Shows a Hello World and message on the commandline
Run httpd webserver
<code>
docker pull httpd
docker run httpd
</code>
Run http and expose it to the outside world (''-p container:host'')
<code>
docker run -p 80:80 --name web01 -d httpd
</code>
Show running containers
<code>
docker ps
</code>
Get stuff from the webserver
<code>
curl localhost
</code>
Stop the container
<code>
docker stop web01
</code>
Remove the container
<code>
docker rm web01
</code>
=== Comments ===

Revision as of 19:30, 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-commn

If needed import the docker repo apt-get update

Install Docker apt-get install docker-ce

Useful commands

Information docket info

Check Version of client and server docker version


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

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 Shows a Hello World and message on the commandline

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

Comments