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

No edit summary
 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Docker ==
== Docker related info broken down in chapters ==
------
=== Installation ===
<code>
apt-get install -y apt-transport-https ca-certificates surl software-properties-common
</code> <br>


If needed import the docker repo <br>
[[ Docker First Steps ]]
<code>
apt-get update 
</code> <br>


Install Docker <br>
[[ Building Containerized Applications ]]
<code>
apt-get install docker-ce
</code> <br>


=== Useful commands ===
[[ Docker Networking ]]


Information  <br>
[[ Docker Compose ]]
<code>
docker info
</code> <br>


Check Version of client and server <br>
[[ Scaling ]]
<code>
docker version
</code> <br>


Search images (usually from hub.docker.com) <br>
[[Category:Docker]]
<code>
docker search ''image''
</code> <br>
 
Get images you want to run  <br>
<code>
docker pull ''image''
</code> <br>
 
Show the images  <br>
<code>
docker image
</code> <br>
 
Run an image in a container <br>
<code>
docke run ''image''
</code> <br>
 
Stop the container <br>
<code>
docker stop web01
</code> <br>
 
Search images  <br>
<code>
docker search ''image''
</code> <br>
 
=== Hello world example ===
Search images  <br>
<code>
docker search ''image''
</code> <br>
 
Run Hello World (Shows a Hello World message on the commandline) <br>
<code>
docker pull hello-world
docker run hello-world
</code> <br>
 
=== HTTPD Example ===
Run httpd webserver <br>
<code>
docker pull httpd
docker run httpd
</code> <br>
 
Run http and expose it to the outside world (''-p container:host'') <br>
<code>
docker run -p 80:80 --name web01 -d httpd
</code> <br>
 
Show running containers <br>
<code>
docker ps
</code> <br>
 
Get stuff from the webserver <br>
<code>
curl localhost
</code> <br>
 
Remove the container <br>
<code>
docker rm web01
</code> <br>
 
=== Comments ===

Latest revision as of 00:13, 25 April 2020