9 Podman as a service

 

This chapter covers

  • Running Podman as a service
  • Podman service support for two REST APIs
  • Python libraries podman-py and docker-py for managing Podman containers
  • Support for docker-compose
  • Remote command-line communication with the Podman service
  • Managing SSH communications with remote Podman instances

In previous chapters, you learned about the Podman command line. The problem with this is sometimes you want to work with containers from a remote system. Similarly, you might want to write code in a scripting language to interact with containers. Docker, being written as a client-server application, supports a popular remote API, which led to the creation of libraries written in Python and JavaScript to access the daemon. Docker-py is a popular Python library used to interact with the Docker daemon.

Many CI/CD, GUI, and remote management systems have been built to manage Docker containers. Code editors like Visual Studio even have built-in plug-ins that talk directly to the Docker API. Advanced tools like docker-compose led to a new programming language that is used to orchestrate multiple containers on a host by interacting with the Docker daemon.

9.1 Introducing the Podman service

9.1.1 Systemd services

9.2 Podman-supported APIs

9.3 Python libraries for interacting with Podman

9.3.1 Using docker-py with the Podman API

9.3.2 Using podman-py with the Podman API

9.3.3 Which Python library should you use?

9.4 Using docker-compose with the Podman service

9.5 podman - -remote

9.5.1 Local connections

9.5.2 Remote connections

9.5.3 Setting up SSH on the client machine

9.5.4 Configuring a connection

Summary