tracynlcode / RDPWin11

For WIN11 Deloy
0 stars 0 forks source link

Dockerfile #1

Open tracynlcode opened 2 weeks ago

tracynlcode commented 2 weeks ago

FROM dpage/pgadmin4:8.6 USER root RUN setcap -r /usr/bin/python3.11 ENV PGADMIN_LISTN_ADDRESS=0.0.0.0 ENV PGADMIN_DISABLE_POSTFIX=true ENV PGADMIN_CONFIG_UPGRADE_CHECK_ENABLED=False ENV PGADMIN_CONFIG_ENABLE_PSQL=True

COPY render-entrypoint.sh /render-entrypoint.sh RUN chmod +x /render-entrypoint.sh

ENTRYPOINT ["/render-entrypoint.sh"]

tracynlcode commented 2 weeks ago

render-entrypoint.sh => for running bash command

tracynlcode commented 2 weeks ago

!/bin/sh

chown pgadmin:root /var/lib/pgadmin

pgadmin will setup initial servers based on the default email of the user

the path has the @ symbol replaced with an underscore

storage_path=/var/lib/pgadmin/storage/$(echo $PGADMIN_DEFAULTEMAIL | sed 's/@//g') sudo -u pgadmin mkdir -p -m 00775 $storage_path

render secret files are owned by root so we need to copy them over with the

appropriate user / group / permissions for pgadmin to read the initial servers file

install -o pgadmin -g root -m 00755 /etc/secrets/servers.json /var/lib/pgadmin/storage/

postgres requires the pgpassfile to have specific permissions for security purposes

install -o pgadmin -g root -m 0600 /etc/secrets/pgpassfile $storage_path

sudo -Eu pgadmin /entrypoint.sh