Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Dockerfile specifications for connecting pgadmin4 container to postgres container on startup

  • Emrah KAYA
  • 2025-08-15
  • 3
Dockerfile specifications for connecting pgadmin4 container to postgres container on startup
  • ok logo

Скачать Dockerfile specifications for connecting pgadmin4 container to postgres container on startup бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Dockerfile specifications for connecting pgadmin4 container to postgres container on startup или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Dockerfile specifications for connecting pgadmin4 container to postgres container on startup бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Dockerfile specifications for connecting pgadmin4 container to postgres container on startup

Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram:   / ky.emrah  

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!Dockerfile specifications for connecting pgadmin4 container to postgres container on startup

I am new to Docker and am not entirely sure whether what I am asking about is possible or not.
I have set up a docker container with Postgres database running in it (on localhost on 5432 port).
My Dockerfile for setting the container up looks like this:
syntax=docker/dockerfile:1
FROM postgres:latest
ENV POSTGRES_PASSWORD=somepassword
ENV POSTGRES_DB=somedb
COPY ./somesqlscript.sql /docker-entrypoint-initdb.d/
EXPOSE 5432
CMD ["postgres"]

syntax=docker/dockerfile:1
FROM postgres:latest
ENV POSTGRES_PASSWORD=somepassword
ENV POSTGRES_DB=somedb
COPY ./somesqlscript.sql /docker-entrypoint-initdb.d/
EXPOSE 5432
CMD ["postgres"]

Then I set up a pgadmin4 container with the following Dockerfile:
syntax=docker/dockerfile:1
FROM dpage/pgadmin4:latest

ENV [email protected]
ENV PGADMIN_DEFAULT_PASSWORD=somepassword

EXPOSE 80

CMD ["dpage/pgadmin4"]

syntax=docker/dockerfile:1
FROM dpage/pgadmin4:latest

ENV [email protected]
ENV PGADMIN_DEFAULT_PASSWORD=somepassword

EXPOSE 80

CMD ["dpage/pgadmin4"]

[email protected]
What I wanted next is for the pgadmin container to connect to the container with postgres database on startup of the container with specified default credentials and open a connection to my database "somedb".
I wanted any user building and running my containers to be able to navigate to localhost:5050 in their browsers and either directly be connected to the specified database with no credentials, or enter a login and password and be connected. The main point here is that the user wouldn't have to add the server manually.
If manually adding credentials, the following works from pgadmin "add server" UI:
name: container-postgres
host: host.docker.internal
database: postgres
user: postgres
password: somepassword

name: container-postgres
host: host.docker.internal
database: postgres
user: postgres
password: somepassword

I found PGAdmin4 documentation, which specified the following:
*PGADMIN_LISTEN_ADDRESS
Default: [::]
Specify the local address that the servers listens on. The default should work for most users - in IPv4-only environments, this may need to be set to 0.0.0.0.
PGADMIN_LISTEN_PORT
Default: 80 or 443 (if TLS is enabled)
Allows the port that the server listens on to be set to a specific value rather than using the default.*
source: https://www.pgadmin.org/docs/pgadmin4...
https://www.pgadmin.org/docs/pgadmin4...
However, neither host.docker.internal nor IPAddress from the output of
docker inspect container-postgresdb -f "{{json .NetworkSettings.Networks }}"

docker inspect container-postgresdb -f "{{json .NetworkSettings.Networks }}"

works for me as ENV PGADMIN_LISTEN_ADDRESS, as both return the same error:
ENV PGADMIN_LISTEN_ADDRESS
[2024-09-13 02:03:13 +0000] [1] [ERROR] Can't connect to ('host.docker.internal', 5432)

[2024-09-13 02:03:13 +0000] [1] [ERROR] Can't connect to ('host.docker.internal', 5432)

or
[2024-09-13 02:06:44 +0000] [1] [ERROR] Can't connect to ('172.17.0.2', 5432)


[2024-09-13 02:06:44 +0000] [1] [ERROR] Can't connect to ('172.17.0.2', 5432)


What should I specify there for my purpose?
Another stated in the documentation option is
*PGADMIN_CONFIG_
This is a variable prefix that can be used to override any of the configuration options in pgAdmin’s config.py file. Add the PGADMIN_CONFIG_ prefix to any variable name from config.py and gSource of the question:
https://stackoverflow.com/questions/7...

Question and source license information:
https://meta.stackexchange.com/help/l...
https://stackoverflow.com/

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]