Skip to content

Commit ced039b

Browse files
Bharath KaimalBharath Kaimal
authored andcommitted
addition of podman tutorial to container/image registry page
1 parent 112e3ea commit ced039b

File tree

1 file changed

+66
-6
lines changed

1 file changed

+66
-6
lines changed

docs/containers/imageregistry.md

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,71 @@ A registry is a repository used to store and access container images. Container
44

55
Container registries save developers valuable time in the creation and delivery of cloud-native applications, acting as the intermediary for sharing container images between systems. They essentially act as a place for developers to store container images and share them out via a process of uploading (pushing) to the registry and downloading (pulling) into another system, like a Kubernetes cluster.
66

7-
[Learn More :fontawesome-solid-globe:](https://www.redhat.com/en/topics/cloud-native-apps/what-is-a-container-registry){ .md-button target="_blank"}
7+
[Learn More :fontawesome-solid-globe:](https://www.redhat.com/en/topics/cloud-native-apps/what-is-a-container-registry){ .md-button target="\_blank"}
88

9-
=== "Tutorial"
9+
## Tutorial
10+
11+
=== "Podman"
12+
13+
Make sure you have Podman Desktop installed and up and running.
14+
15+
Here's how to find a list of publicly available container images on DockerHub.
16+
17+
``` Bash title="Find Container Image"
18+
podman search docker.io/busybox
19+
```
20+
21+
``` Bash title="Output:"
22+
NAME DESCRIPTION
23+
docker.io/library/busybox Busybox base image.
24+
docker.io/rancher/busybox
25+
docker.io/openebs/busybox-client
26+
docker.io/antrea/busybox
27+
docker.io/hugegraph/busybox test image
28+
...
29+
```
30+
31+
We can create a _busybox_ container image based off of the _busybox_ base image you see listed in the output above.
32+
33+
``` Bash title="Create Image"
34+
podman run -it docker.io/library/busybox
35+
```
36+
37+
The _-it_ flag allows you to run the image in interactive mode. Interactive mode in Podman allows you to run a shell in a container and interact with it. However, you'll see that running small containers like this one don't have much to play around with in the interactive mode. To exit out of the interactive mode:
38+
39+
``` Bash title="Exit Interactive mode"
40+
exit
41+
```
42+
43+
You can also share images in a public registry so that others can use and review them. Here's how to push your image up to quay.io.
44+
45+
``` Bash title="Login to quay.io"
46+
podman login quay.io
47+
```
48+
Enter in the following info:
49+
50+
```
51+
Username: your_username
52+
Password: your_password
53+
```
54+
55+
Next, tag the image so that you can push it and find it in your account.
56+
57+
``` Bash title="Tag Image"
58+
podman tag <image_name> quay.io/your_username/image_registry_name
59+
```
60+
61+
Make sure to replace "image_name" with the name of the image you want to push up to quay.
62+
Replace "user_name" with your quay.io username.
63+
Replace "image_registry_name" with what you want the image to be named/labeled as in quay.
64+
65+
Once the image is tagged, you can push it up to quay.
66+
67+
``` Bash title="Push Image"
68+
podman push quay.io/your_username/image_registry_name
69+
```
70+
71+
=== "Docker"
1072

1173
Make sure you have Docker Desktop installed and up and running.
1274

@@ -17,7 +79,7 @@ Container registries save developers valuable time in the creation and delivery
1779
Email: your_email
1880
```
1981

20-
First we'll create a container with a single new file based off of the busybox base image:
82+
First we'll create a container with a single new file based off of the busybox base image:
2183
``` Bash title="Create a new container"
2284
docker run busybox echo "fun" > newfile
2385
```
@@ -40,7 +102,5 @@ Container registries save developers valuable time in the creation and delivery
40102
Your respository has now been pushed to Quay Container Registry!
41103

42104
To view your repository, click on the button below:
43-
44-
[Repositories](https://quay.io/repository/){ .md-button target="_blank"}
45105

46-
106+
[Repositories](https://quay.io/repository/){ .md-button target="_blank"}

0 commit comments

Comments
 (0)