Skip to content

Instantly share code, notes, and snippets.

@kad1r
Last active October 12, 2023 09:46
Show Gist options
  • Save kad1r/b4ab54aea2de77e58d50e2aac38b3b10 to your computer and use it in GitHub Desktop.
Save kad1r/b4ab54aea2de77e58d50e2aac38b3b10 to your computer and use it in GitHub Desktop.
Podman

https://dev.to/pr0pm/run-postgresql-pgadmin-in-pods-using-podman-386o

podman pod create --name postgres_pgadmin -p 9876:80
podman run --pod=postgres_pgadmin -e 'PGADMIN_DEFAULT_EMAIL=admin@admin.com' -e 'PGADMIN_DEFAULT_PASSWORD=yourpasswrod' --name pgadmin -d dpage/pgadmin4
podman run --pod=postgres_pgadmin -e POSTGRES_PASSWORD=password -e POSTGRES_USER=user --name db -d postgres
podman pod stats postgres_pgadmin
** 0.0.0.0:9876 or 127.0.0.1:9876 copy/paste this to your browser to configure pgadmin

podman pod pause postgres_pgadmin
podman pod unpause postgres_pgadmin
podman pod start postgres_pgadmin
podman pod stop postgres_pgadmin

** If you wish to to generate the config with all the stuff ready for you to reproduce later
podman generate kube postgres_pgadmin >> postgres_pgadmin-pod-conf.yml
podman machine init 
podman machine start 
podman create -it --name postgress-container -e POSTGRES_PASSWORD=sa -p 8080:8080 postgres:15.1

screencapture-dev-to-pr0pm-run-postgresql-pgadmin-in-pods-using-podman-386o-2023-10-12-11_38_45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment