<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Docker%2FHello_World</id>
	<title>Docker/Hello World - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Docker%2FHello_World"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Docker/Hello_World&amp;action=history"/>
	<updated>2026-06-19T12:47:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Docker/Hello_World&amp;diff=21378&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;To run your first Docker container, Docker provides a hello-world container.  ==Get the container image==  You can either explicitly pull the hello-world container from Docker...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Docker/Hello_World&amp;diff=21378&amp;oldid=prev"/>
		<updated>2017-09-23T19:11:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;To run your first Docker container, Docker provides a hello-world container.  ==Get the container image==  You can either explicitly pull the hello-world container from Docker...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;To run your first Docker container, Docker provides a hello-world container.&lt;br /&gt;
&lt;br /&gt;
==Get the container image==&lt;br /&gt;
&lt;br /&gt;
You can either explicitly pull the hello-world container from Dockerhub (recommended), or you can let Docker take care of it for you.&lt;br /&gt;
&lt;br /&gt;
===Pull container image from dockerhub===&lt;br /&gt;
&lt;br /&gt;
Pull the hello-world image from Dockerhub:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker pull hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===List all container images===&lt;br /&gt;
&lt;br /&gt;
Use the docker images command to list all the container images in Docker:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker images&lt;br /&gt;
REPOSITORY                      TAG                 IMAGE ID            CREATED             SIZE&lt;br /&gt;
hello-world                     latest              05a3bd381fc2        10 days ago         1.84kB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Run the hello-world container===&lt;br /&gt;
&lt;br /&gt;
To run the container, use the docker run command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker run hello-world&lt;br /&gt;
Unable to find image &amp;#039;hello-world:latest&amp;#039; locally&lt;br /&gt;
latest: Pulling from library/hello-world&lt;br /&gt;
5b0f327be733: Pull complete&lt;br /&gt;
Digest: sha256:1f19634d26995c320618d94e6f29c09c6589d5df3c063287a00e6de8458f8242&lt;br /&gt;
Status: Downloaded newer image for hello-world:latest&lt;br /&gt;
&lt;br /&gt;
Hello from Docker!&lt;br /&gt;
This message shows that your installation appears to be working correctly.&lt;br /&gt;
&lt;br /&gt;
To generate this message, Docker took the following steps:&lt;br /&gt;
 1. The Docker client contacted the Docker daemon.&lt;br /&gt;
 2. The Docker daemon pulled the &amp;quot;hello-world&amp;quot; image from the Docker Hub.&lt;br /&gt;
 3. The Docker daemon created a new container from that image which runs the&lt;br /&gt;
    executable that produces the output you are currently reading.&lt;br /&gt;
 4. The Docker daemon streamed that output to the Docker client, which sent it&lt;br /&gt;
    to your terminal.&lt;br /&gt;
&lt;br /&gt;
To try something more ambitious, you can run an Ubuntu container with:&lt;br /&gt;
 $ docker run -it ubuntu bash&lt;br /&gt;
&lt;br /&gt;
Share images, automate workflows, and more with a free Docker ID:&lt;br /&gt;
 https://cloud.docker.com/&lt;br /&gt;
&lt;br /&gt;
For more examples and ideas, visit:&lt;br /&gt;
 https://docs.docker.com/engine/userguide/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Remove the container image==&lt;br /&gt;
&lt;br /&gt;
Now remove the image from your system entirely. This is a two step process:&lt;br /&gt;
* Remove the stopped process&lt;br /&gt;
* Remove the container image&lt;br /&gt;
&lt;br /&gt;
===Remove the stopped process===&lt;br /&gt;
&lt;br /&gt;
After you run the hello-world container, it will print out its hello world message, then shut down. However, if you try to remove the image straight away, you&amp;#039;ll get an error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker rmi 05a3bd381fc2&lt;br /&gt;
Error response from daemon: conflict: unable to delete 05a3bd381fc2 (must be forced) - image is being used by stopped container 31155e25a61e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because, even when a container image has finished running, it remains in the process queue as a &amp;quot;stopped&amp;quot; process. You have to delete the stopped process first, then you can delete the image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To list all processes, including stopped processes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker ps -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the container ID or the name to remove the stopped image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker rm 31155e25a61e&lt;br /&gt;
&lt;br /&gt;
$ docker rm quirky_twain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Remove the container image===&lt;br /&gt;
&lt;br /&gt;
Now that you&amp;#039;ve removed the stopped process, you can remove the container image using its name or its ID:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker rmi 05a3bd381fc2&lt;br /&gt;
Untagged: hello-world:latest&lt;br /&gt;
Untagged: hello-world@sha256:1f19634d26995c320618d94e6f29c09c6589d5df3c063287a00e6de8458f8242&lt;br /&gt;
Deleted: sha256:05a3bd381fc2470695a35f230afefd7bf978b566253199c4ae5cc96fafa29b37&lt;br /&gt;
Deleted: sha256:3a36971a9f14df69f90891bf24dc2b9ed9c2d20959b624eab41bbf126272a023&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker rm hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flags==&lt;br /&gt;
&lt;br /&gt;
{{DockerFlag}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>