cancel
Showing results for 
Search instead for 
Did you mean: 
biltonbilmes
Flight Engineer
Flight Engineer
  • 163 Views

Guided Exercise: Working with Databases: How do I know which variables to use?

Jump to solution

Hi There,

How do I know which variable I have to use? In the container meta data I do not find them at all. In real life this is very important to understand. I"m beginner so it might look dumbo question

[student@workstation ~]$ podman run -d \
  --name persisting-pgadmin \
  -e PGADMIN_SETUP_EMAIL=gls@example.com \
  -e PGADMIN_SETUP_PASSWORD=pga_secret_pass \
  -p 5050:5050 \
  --network persisting-network \
  registry.ocp4.example.com:8443/crunchydata/crunchy-pgadmin4:ubi8-4.30-1

 

1 Solution

Accepted Solutions
shura
Flight Engineer
Flight Engineer
  • 147 Views

Hi

The answer depends of application. Best choice official documentation, for your example: https://access.crunchydata.com/documentation/crunchy-postgres-containers/5.3.1/container-specificati...
Many appliction, such as mysql, postgresql, bying started without required environment returns help info. Something simile it is possible to get in your example:

[student@workstation ~]$ podman run --name persisting-pgadmin --rm -p 5050:5050 registry.ocp4.example.com:8443/crunchydata/crunchy-pgadmin4:ubi8-4.30-1
nss_wrapper: adding user
nss_wrapper: adding group
nss_wrapper: environment configured
Thu Feb 6 09:53:47 UTC 2025 ERROR: PGADMIN_SETUP_EMAIL environment variable is not set, aborting.
[student@workstation ~]$ podman run --name persisting-pgadmin --rm -p 5050:5050 -e PGADMIN_SETUP_EMAIL=gls@example.com registry.ocp4.example.com:8443/crunchydata/crunchy-pgadmin4:ubi8-4.30-1
nss_wrapper: adding user
nss_wrapper: adding group
nss_wrapper: environment configured
Thu Feb 6 09:54:30 UTC 2025 ERROR: PGADMIN_SETUP_PASSWORD environment variable is not set, aborting.
[student@workstation ~]$ podman run --name persisting-pgadmin --rm -p 5050:5050 -e PGADMIN_SETUP_EMAIL=gls@example.com -e PGADMIN_SETUP_PASSWORD=pga_secret_pass registry.ocp4.example.com:8443/crunchydata/crunchy-pgadmin4:ubi8-4.30-1
nss_wrapper: adding user
nss_wrapper: adding group
nss_wrapper: environment configured
Thu Feb 6 09:55:18 UTC 2025 INFO: TLS disabled. Applying http configuration..
Thu Feb 6 09:55:18 UTC 2025 INFO: Setting up pgAdmin4 database..
Thu Feb 6 09:55:22 UTC 2025 INFO: Starting Apache web server..

Good luck

 

View solution in original post

2 Replies
shura
Flight Engineer
Flight Engineer
  • 148 Views

Hi

The answer depends of application. Best choice official documentation, for your example: https://access.crunchydata.com/documentation/crunchy-postgres-containers/5.3.1/container-specificati...
Many appliction, such as mysql, postgresql, bying started without required environment returns help info. Something simile it is possible to get in your example:

[student@workstation ~]$ podman run --name persisting-pgadmin --rm -p 5050:5050 registry.ocp4.example.com:8443/crunchydata/crunchy-pgadmin4:ubi8-4.30-1
nss_wrapper: adding user
nss_wrapper: adding group
nss_wrapper: environment configured
Thu Feb 6 09:53:47 UTC 2025 ERROR: PGADMIN_SETUP_EMAIL environment variable is not set, aborting.
[student@workstation ~]$ podman run --name persisting-pgadmin --rm -p 5050:5050 -e PGADMIN_SETUP_EMAIL=gls@example.com registry.ocp4.example.com:8443/crunchydata/crunchy-pgadmin4:ubi8-4.30-1
nss_wrapper: adding user
nss_wrapper: adding group
nss_wrapper: environment configured
Thu Feb 6 09:54:30 UTC 2025 ERROR: PGADMIN_SETUP_PASSWORD environment variable is not set, aborting.
[student@workstation ~]$ podman run --name persisting-pgadmin --rm -p 5050:5050 -e PGADMIN_SETUP_EMAIL=gls@example.com -e PGADMIN_SETUP_PASSWORD=pga_secret_pass registry.ocp4.example.com:8443/crunchydata/crunchy-pgadmin4:ubi8-4.30-1
nss_wrapper: adding user
nss_wrapper: adding group
nss_wrapper: environment configured
Thu Feb 6 09:55:18 UTC 2025 INFO: TLS disabled. Applying http configuration..
Thu Feb 6 09:55:18 UTC 2025 INFO: Setting up pgAdmin4 database..
Thu Feb 6 09:55:22 UTC 2025 INFO: Starting Apache web server..

Good luck

 

Travis
Moderator
Moderator
  • 127 Views

So the course and gives you the guided exercises and the solutions. However, in real life, you would see if there is documentation that goes with your image from a given container registry. Another thing, that would be more applicable and sometimes easier to do is actually inspect the image.

The podman inspect command would provide details about the image as well as the environment variables. If you forget to set an environment variable, the error is generally easy to spot in the log files or the output. Keep in mind, the podman inspect requires that the image already be available locally (so it might require a podman pull or run to have been attempted to ensure it is in the local container repo). There is another command skopeo that allows inspecting images from remote container registries.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Join the discussion
You must log in to join this conversation.