github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/contrib/hello/README.md (about) 1  2 3 # Podman Hello World image 4 5 ## Overview 6 7 This directory contains the Containerfile and bash script necessary to create the 8 "hello" podman image housed on quay.io under the Podman account in a public 9 repository. The image is public and can be pulled without credentials. 10 11 Using this image is helpful to: 12 13 * Prove that basic Podman operations are working on the host. 14 * Shows that the image was pulled from the quay.io container registry. 15 * Container creation was successfully accomplished. (`podman ps -a`) 16 * The created container was able to stream output to your terminal. 17 18 ## Directory Contents 19 20 The contents of this directory contain: 21 * ./Containerfile 22 * ./podman_hello_world.c 23 24 ## Sample Usage 25 26 To simply run the image: 27 28 ``` 29 podman run quay.io/podman/hello 30 31 !... Hello Podman World ...! 32 33 .--"--. 34 / - - \ 35 / (O) (O) \ 36 ~~~| -=(,Y,)=- | 37 .---. /` \ |~~ 38 ~/ o o \~~~~.----. ~~ 39 | =(X)= |~ / (O (O) \ 40 ~~~~~~~ ~| =(Y_)=- | 41 ~~~~ ~~~| U |~~ 42 43 Project: https://github.com/containers/podman 44 Website: https://podman.io 45 Documents: https://docs.podman.io 46 Twitter: @Podman_io 47 ``` 48 To build the image yourself, copy the files from this directory into 49 a local directory and issue these commands: 50 51 ``` 52 podman build -t myhello . 53 podman run myhello 54 ``` 55 56 ## Potential Issues: 57 58 The image runs as a rootless user with the UID set to `1000`. 59 If the /etc/subuid and /etch/subgid values are not set appropriately to run as a 60 rootless user on the host, an error like this might be raised: 61 62 ``` 63 Copying blob acab339ca1e8 done 64 ERRO[0002] Error while applying layer: ApplyLayer exit status 1 stdout: stderr: potentially insufficient UIDs or GIDs available in user namespace (requested 0:12 for /var/spool/mail): Check /etc/subuid and /etc/subgid: lchown /var/spool/mail: invalid argument 65 Error: writing blob: adding layer with blob "sha256:ee0cde9de8a68f171a8c03b0e9954abf18576947e2f3187e84d8c31ccd8f6a09": ApplyLayer exit status 1 stdout: stderr: potentially insufficient UIDs or GIDs available in user namespace (requested 0:12 for /var/spool/mail): Check /etc/subuid and /etc/subgid: lchown /var/spool/mail: invalid argument 66 ``` 67 68 Please refer to this [blog post](https://www.redhat.com/sysadmin/rootless-podman) for further configuration information. 69 70 ## THANKS! 71 72 Many Thanks to @afbjorklund for a great discussion during the 73 first revision of this container image that resulted in moving 74 from using bash to using C, and the ensuing changes to the 75 Containerfile. 76 77 Also many thanks to @mairin for the awesome ASCII art!