Skip to content

Commit faf8574

Browse files
Merge pull request #25450 from baude/issue25449
Replace old nginx image with podman hello
2 parents 919247a + 727542f commit faf8574

File tree

1 file changed

+34
-25
lines changed

1 file changed

+34
-25
lines changed

docs/source/Introduction.rst

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,42 @@ There’s an old saying that “nobody runs an operating system just to run an o
3434

3535
Sometimes we can find a publicly available container image for the exact workload we’re looking for and it will already be packaged exactly how we want. But, more often than not, there’s something that we want to add, remove, or customize. It can be as simple as a configuration setting for security or performance, or as complex as adding a complex workload. Either way, containers make it fairly easy to make the changes we need.
3636

37-
Container Images aren’t actually images, they’re repositories often made up of multiple layers. These layers can easily be added, saved, and shared with others by using a Containerfile (Dockerfile). This single file often contains all the instructions needed to build a new container image and can easily be shared with others publicly using tools like GitHub.
37+
Container Images aren’t actually images. They are repositories often made up of multiple layers. These layers can easily be added, saved, and shared with others by using a Containerfile (Dockerfile). This single file often contains all the instructions needed to build a new container image and can easily be shared with others publicly using tools like GitHub.
3838

39-
Here's an example of how to build a Nginx web server on top of a Debian base image using the Dockerfile maintained by Nginx and published in GitHub::
40-
41-
podman build -t nginx https://git.io/Jf8ol
39+
Here's an example of how to build a build a container image from content that resides in a git repository:
4240

41+
podman build -t hello https://github.com/containers/PodmanHello.git
4342
Once, the image build completes, it’s easy to run the new image from our local cache::
4443

45-
podman run -d -p 8080:80 nginx
46-
curl localhost:8080
44+
podman run -it hello
4745

4846
Output::
49-
50-
...
51-
<p><em>Thank you for using nginx.</em></p>
47+
!... Hello Podman World ...!
48+
49+
.--"--.
50+
/ - - \
51+
/ (O) (O) \
52+
~~~| -=(,Y,)=- |
53+
.---. /` \ |~~
54+
~/ o o \~~~~.----. ~~
55+
| =(X)= |~ / (O (O) \
56+
~~~~~~~ ~| =(Y_)=- |
57+
~~~~ ~~~| U |~~
58+
59+
Project: https://github.com/containers/podman
60+
Website: https://podman.io
61+
Desktop: https://podman-desktop.io
62+
Documents: https://docs.podman.io
63+
YouTube: https://youtube.com/@Podman
64+
X/Twitter: @Podman_io
65+
Mastodon: @Podman_io@fosstodon.org
5266
...
5367

54-
Building new images is great, but sharing our work with others lets them review our work, critique how we built them, and offer improved versions. Our newly built Nginx image can be published at quay.io or docker.io to share it with the world. Everything needed to run the Nginx application is provided in the container image. Others can easily pull it down and use it, or make improvements to it.
68+
Building new images is great, but sharing our work with others lets them review our work, critique how we built them, and offer improved versions. Our newly built `hello` image can be published at quay.io or docker.io to share it with the world. Everything needed to run the `hello` application is provided in the container image. Others can easily pull it down and use it, or make improvements to it.
5569

5670
Standardizing on container images and `Container Registries`_ enable a new level of collaboration through simple consumption. This simple consumption model is possible because every major Container Engine and Registry Server uses the Open Containers Initiative (OCI_) format. This allows users to find, run, build, share and deploy containers anywhere they want. Podman and other `Container Engines`_ like CRI-O, Docker, or containerd can create and consume container images from docker.io, quay.io, an on premise registry or even one provided by a cloud provider. The OCI image format facilitates this ecosystem through a single standard.
5771

58-
For example, if we wanted to share our newly built Nginx container image on quay.io it’s easy. First log in to quay::
72+
For example, if we wanted to share our newly built `hello` container image on quay.io it’s easy. First log in to quay::
5973

6074
podman login quay.io
6175
Input::
@@ -66,36 +80,31 @@ Input::
6680

6781
Next, tag the image so that we can push it into our user account::
6882

69-
podman tag localhost/nginx quay.io/USERNAME/nginx
83+
podman tag localhost/hello quay.io/USERNAME/hello
7084

7185
Finally, push the image::
7286

73-
podman push quay.io/USERNAME/nginx
87+
podman push quay.io/USERNAME/hello
7488

7589
Output::
7690

7791
Getting image source signatures
78-
Copying blob 38c40d6c2c85 done
79-
Copying blob fee76a531659 done
80-
Copying blob c2adabaecedb done
81-
Copying config 7f3589c0b8 done
82-
Writing manifest to image destination
83-
Copying config 7f3589c0b8 done
92+
Copying blob bf62b9b17289 done |
93+
Copying config 17a4bf5a30 done |
8494
Writing manifest to image destination
85-
Storing signatures
8695

87-
Notice that we pushed four layers to our registry and now it’s available for others to share. Take a quick look::
96+
Notice that we pushed one layer to our registry and now it’s available for others to share. Take a quick look::
8897

89-
podman inspect quay.io/USERNAME/nginx
98+
podman inspect quay.io/USERNAME/hello
9099

91100
Output::
92101

93102
[
94103
{
95-
"Id": "7f3589c0b8849a9e1ff52ceb0fcea2390e2731db9d1a7358c2f5fad216a48263",
96-
"Digest": "sha256:7822b5ba4c2eaabdd0ff3812277cfafa8a25527d1e234be028ed381a43ad5498",
104+
"Id": "17a4bf5a301a374771ac66dd09c33d1d765af5265d20d6b4da7ac578381efd87",
105+
"Digest": "sha256:ee693991b0c8c8c12dfe0e90c25db1b73867e672478fd7a187a2fae31f72531a",
97106
"RepoTags": [
98-
"quay.io/USERNAME/nginx:latest",
107+
"quay.io/USERNAME/hello:latest",
99108
...
100109

101110
To summarize, Podman makes it easy to find, run, build and share containers.

0 commit comments

Comments
 (0)