podman

Description

Mind Map on podman, created by Luiz Eduardo on 25/06/2021.
Luiz  Eduardo
Mind Map by Luiz Eduardo, updated more than 1 year ago
Luiz  Eduardo
Created by Luiz Eduardo about 3 years ago
598
0

Resource summary

podman

Annotations:

  • https://podman.io/ Podman is a daemonless, open source, Linux native tool designed to make it easy to find, run, build, share and deploy applications using Open Containers Initiative (OCI) Containers and Container Images. Podman provides a command line interface (CLI) familiar to anyone who has used the Docker Container Engine. Most users can simply alias Docker to Podman (alias docker=podman) without any problems. Similar to other common Container Engines (Docker, CRI-O, containerd), Podman relies on an OCI compliant Container Runtime (runc, crun, runv, etc) to interface with the operating system and create the running containers. This makes the running containers created by Podman nearly indistinguishable from those created by any other common container engine.
  1. Podman is a daemonless, open source, Linux native tool designed to make it easy to find, run, build, share and deploy applications using Open Containers Initiative (OCI) Containers and Container Images.
    1. Fetching and run Container Images with Podman
      1. $ podman search rhel
        1. $ podman pull rhel

          Annotations:

          • After you have found an image, you can use Podman to download it. When using the pull subcommand, Podman fetches the image and saves it locally for future use:
          1. $ podman run ubi7/ubi:7.7 echo "Hello!"

            Annotations:

            • The following example starts a container from a Red HatEnterprise Linux image. It sets the entry point for this container to the echo "Hello world"command.
            1. $ podman run -d rhscl/httpd-24-rhel7:2.4-36.8

              Annotations:

              • To start a container image as a background process, pass the -d option to the podman runcommand:
              1. $ podman inspect -l -f "{{.NetworkSettings.IPAddress}}"
                1. $ podman run --name mysql-custom -e MYSQL_USER=redhat -e MYSQL_PASSWORD=r3dh4t -d rhmap47/mysql:5.5

                  Annotations:

                  • The previous example starts a RHEL image container that prints the two environment variables provided as parameters. Another use case for environment variables is setting up credentials into a MySQL database server:
                  1. $ podman run rhscl/httpd-24-rhel7:2.4-36.8 ls /tmp

                    Annotations:

                    • The specified command must be executable inside the container image.
                    1. $ podman restart my-httpd-containe
                    2. Finding Images
                      1. podman images
                        1. podman history image:tag
                          1. podman login <registryURL> -u username -p <password>
                            1. podman pull registryURL/username/image:tag
                              1. podman search searchString
                              2. Building Images
                                1. podman build -t image:tag -f Dockerfile2
                                  1. podman tag image:tag image:tag2
                                    1. podman rag image:tag registryURL/username/image:tag
                                      1. podman build -t image:tag
                                        1. podman push registryURL/username/image:tag
                                        2. Processes and resources
                                          1. podman ps --all
                                            1. podman attach container
                                              1. podman exec container <command>
                                                1. podman top container
                                                  1. podman logs -tail container
                                                    1. podman port container

                                                      Annotations:

                                                      • list the port mappings from a container to localhost
                                                    2. Container's Filesystem
                                                      1. podman diff container
                                                        1. podman cp source target
                                                          1. podman mount container
                                                            1. podman umount container
                                                              1. podman import tarball
                                                                1. podman save -o <archiveFile> --format <docker-archive | oci-archive | oci-dir | docker-dir> image:tag
                                                                  1. podman load -i archiveFile
                                                                  2. Running containers on images
                                                                    1. podman run --rm -it --name <name> images:tag command
                                                                      1. podman commit <container> newimage:tag

                                                                        Annotations:

                                                                        • create new image based on the current state of running container
                                                                        1. podman create --name <name> image:tag

                                                                          Annotations:

                                                                          • create (but don't start) a container from an image
                                                                          1. podman run <option>
                                                                            1. -d

                                                                              Annotations:

                                                                              • Run the container in the background
                                                                              1. -p 8080:3200

                                                                                Annotations:

                                                                                • Expose container port 8080 as localhost:3200
                                                                                1. -v /var/lib/mysqldb:/var/lib/db

                                                                                  Annotations:

                                                                                  • map the /var/lib/mysqldb directory on localhost to a volume named /var/lib/db inside the container
                                                                                2. podman start <container>
                                                                                  1. podman restart <container>
                                                                                    1. podman wait container1 [container2]

                                                                                      Annotations:

                                                                                      • wait on one or more containers to stop
                                                                                      1. podman stop <container>
                                                                                        1. podman kill <container>
                                                                                          1. podman rm -f <container>
                                                                                            1. podman stats <container>
                                                                                              1. podman inspect <container>
                                                                                                1. podman rmi -f <image>
                                                                                                  1. podman exec <container-name> curl -s http://localhost:80/teste.hml
                                                                                                  Show full summary Hide full summary

                                                                                                  Similar

                                                                                                  Chemistry General Quiz - 2
                                                                                                  lauren_johncock
                                                                                                  Dr Jekyll and Mr Hyde
                                                                                                  Rosie:)
                                                                                                  States of Matter
                                                                                                  lauren_nutty
                                                                                                  Physics GCSE AQA Unit 1 quiz
                                                                                                  Adorkable_dreamer
                                                                                                  Variation and evolution Quiz
                                                                                                  James Edwards22201
                                                                                                  ICT GCSE flashcards
                                                                                                  Catherine Archer
                                                                                                  Geography Section 1 (Rivers and Coasts)
                                                                                                  Beth Goodchild
                                                                                                  What is Marketing?
                                                                                                  Stephanie Natasha
                                                                                                  AQA GCSE Chemistry - C1
                                                                                                  Izzy T
                                                                                                  Unit 1 Chapter 1 Items
                                                                                                  Gene G. Dydasco
                                                                                                  (YOUR EVENT)
                                                                                                  Shelby Smith