Articles

Podman: PostgreSQL in a container and a network for Nextcloud

· 1 min readpodmandockerlinux

Podman is the Docker alternative available on Fedora. Installation options: How To Install Docker On Fedora 32 Or 31 (And Alternatives).

PostgreSQL in a container

podman pull postgres
mkdir -p ~/podman/volumes/postgres
podman run --rm --name pg-docker -e POSTGRES_PASSWORD=docker \
   -d -p 5432:5432 \
   -v $HOME/podman/volumes/postgres:/var/lib/postgresql/data:z postgres
podman ps
psql -h localhost -W -U postgres
podman stop pg-docker

The :z suffix on the volume solves the permission denied problem (it relabels the directory for SELinux).

Container logs

podman logs postgres12

Network and volumes for Nextcloud

podman network create nextcloud-net
podman network ls
podman network inspect nextcloud-net

podman volume create nextcloud-app
podman volume ls
podman volume inspect nextcloud-app

Full walkthrough: Installing Nextcloud 20 on Fedora Linux with Podman

All articles

See also

linuxsoftdevel

Linux server administration: a practical cheatsheet

Security checks, certificates, scheduled jobs, disks and backups, network diagnostics and basic system configuration — commands I use on Linux servers.

ovhlinuxsoftdevel

OVH Public Cloud: moving instances, adding disks and swapping the gateway

Moving virtual servers with the OpenStack client, attaching a new block storage disk, and replacing the private network gateway when the public IP is blacklisted.

linuxzshmcsoftdevel

Linux desktop and shell tips: Fedora, zsh, Midnight Commander, KVM

Numpad decimal separator, PackageKit cache, Firefox fonts, SD card backup, KVM snapshots, bulk image resizing, hostname in the zsh prompt and Midnight Commander settings.