Я пытаюсь создать проект Spring Boot с отдельными контейнерами для служб postgres и pgadmin, используя docker Compose. Мне нужно отправить команду ssh, чтобы запустить скрипт по созданию таблицы и поместить в нее некоторые исходные данные из контейнера pgadmin. Итак, у меня есть атрибут команды для установки openssh-server
command: ["sh", "-c", "apt-get update --assume-yes && apt-get dist-upgrade --assume-yes && apt-get install --assume-yes openssh-server && mkdir -p /var/run/sshd && /usr/sbin/sshd -D"]
но по какой-то причине он продолжает зависать на триггерах обработки для libc-bin (2.36-9+deb12u9). Я пытался установить libc-bin отдельно, удалив пакет libc-bin перед установкой openssh и некоторые другие вещи, но не смог пройти эту часть. Ниже приведен небольшой фрагмент результатов работы Docker Compose
postgres_container | Setting up dbus-session-bus-common (1.14.10-1~deb12u1) ...
postgres_container | Setting up procps (2:4.0.2-3) ...
postgres_container | Setting up libx11-6:amd64 (2:1.8.4-2+deb12u2) ...
postgres_container | Setting up dbus-system-bus-common (1.14.10-1~deb12u1) ...
postgres_container | Setting up libfido2-1:amd64 (1.12.0-2+b1) ...
postgres_container | Setting up libxmuu1:amd64 (2:1.1.3-3) ...
postgres_container | Setting up dbus-bin (1.14.10-1~deb12u1) ...
postgres_container | Setting up ncurses-term (6.4-4) ...
postgres_container | Setting up libtirpc3:amd64 (1.3.3+ds-1) ...
postgres_container | Setting up openssh-client (1:9.2p1-2+deb12u4) ...
postgres_container | Setting up libxext6:amd64 (2:1.3.4-1+b1) ...
postgres_container | Setting up dbus-daemon (1.14.10-1~deb12u1) ...
postgres_container | Setting up dbus (1.14.10-1~deb12u1) ...
postgres_container | invoke-rc.d: could not determine current runlevel
postgres_container | invoke-rc.d: policy-rc.d denied execution of start.
postgres_container | Setting up xauth (1:1.1.2-1) ...
postgres_container | Setting up libnsl2:amd64 (1.3.0-2) ...
postgres_container | Setting up libpam-systemd:amd64 (252.33-1~deb12u1) ...
postgres_container | debconf: unable to initialize frontend: Dialog
postgres_container | debconf: (TERM is not set, so the dialog frontend is not usable.)
postgres_container | debconf: falling back to frontend: Readline
postgres_container | debconf: unable to initialize frontend: Readline
postgres_container | debconf: (This frontend requires a controlling tty.)
postgres_container | debconf: falling back to frontend: Teletype
postgres_container | Setting up openssh-sftp-server (1:9.2p1-2+deb12u4) ...
postgres_container | Setting up dbus-user-session (1.14.10-1~deb12u1) ...
postgres_container | Setting up libwrap0:amd64 (7.6.q-32) ...
postgres_container | Setting up openssh-server (1:9.2p1-2+deb12u4) ...
postgres_container | debconf: unable to initialize frontend: Dialog
postgres_container | debconf: (TERM is not set, so the dialog frontend is not usable.)
postgres_container | debconf: falling back to frontend: Readline
postgres_container | debconf: unable to initialize frontend: Readline
postgres_container | debconf: (This frontend requires a controlling tty.)
postgres_container | debconf: falling back to frontend: Teletype
postgres_container |
postgres_container | Creating config file /etc/ssh/sshd_config with new version
postgres_container | Creating SSH2 RSA key; this may take some time ...
postgres_container | 3072 SHA256:jI+RJuOAgrjffqZBKpl5/6oTAiTr0E088dFtrFoskzY root@544ed6f9a2ba (RSA)
postgres_container | Creating SSH2 ECDSA key; this may take some time ...
postgres_container | 256 SHA256:9MJycbVeJG4GrdCR8w35+I+tinw5cgbFVoH3s/1crXk root@544ed6f9a2ba (ECDSA)
postgres_container | Creating SSH2 ED25519 key; this may take some time ...
postgres_container | 256 SHA256:MdtQeo0K5mHXMOdxAKB8QI+i749q4B//2WW9UziVTC0 root@544ed6f9a2ba (ED25519)
postgres_container | invoke-rc.d: could not determine current runlevel
postgres_container | invoke-rc.d: policy-rc.d denied execution of start.
postgres_container | Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.
postgres_container | Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service → /lib/systemd/system/ssh.service.
postgres_container | Processing triggers for libc-bin (2.36-9+deb12u9) ...
Gracefully stopping... (press Ctrl+C again to force)
[+] Stopping 1/2
✔ Container pgadmin_container Stopped 0.0s
- Container postgres_container Stopping 0.2s
dependency failed to start: container postgres_container is unhealthy
А вот мой файл компоновки докера:
services:
postgres:
image: 'postgres:latest'
container_name: "${DB_CONTAINER_NAME}"
restart: always
networks:
- default
environment:
POSTGRES_HOST: "${DB_HOST}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_USER: "${DB_USER}"
POSTGRES_DB: "${DB_NAME}"
POSTGRES_TABLE_NAME: "${DB_TABLE_NAME}"
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
- postgres-data:/var/lib/postgresql/data/
- ./postgres-data/scripts:/scripts
command: ["sh", "-c", "apt-get update --assume-yes && apt-get dist-upgrade --assume-yes && apt-get install --assume-yes openssh-server && mkdir -p /var/run/sshd && /usr/sbin/sshd -D"]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
pgadmin:
image: 'docker.io/dpage/pgadmin4:latest'
container_name: "${PGADMIN_CONTAINER_NAME}"
user: root
depends_on:
postgres:
condition: service_healthy
restart: always
networks:
- default
environment:
PGADMIN_SERVERS_NAME: "${PGADMIN_SERVERS_NAME}"
PGADMIN_DEFAULT_EMAIL: "${PGADMIN_DEFAULT_EMAIL}"
PGADMIN_DEFAULT_PASSWORD: "${PGADMIN_DEFAULT_PASSWORD}"
POSTGRES_HOST: "${DB_HOST}"
POSTGRES_PORT: "${DB_PORT}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_USER: "${DB_USER}"
POSTGRES_DB: "${DB_NAME}"
USERS_TABLE_NAME: "${DB_TABLE_NAME}"
ports:
- "${PGADMIN_CLIENT_PORT}:80"
volumes:
- pgadmin-data:/var/lib/pgadmin/
- ./pgadmin-data/scripts:/scripts
healthcheck:
test: ["CMD-SHELL", "ping -c4 postgres"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
entrypoint: ["/bin/sh", "-c", "/scripts/entrypoint.sh"]
volumes:
postgres-data:
pgadmin-data:
networks:
default:
name: "${PROJECT_NETWORK_NAME}"
driver: bridge
Подробнее здесь: https://stackoverflow.com/questions/793 ... ner-debian
Libc-bin застревает в докер-контейнере Debian ⇐ Linux
-
Anonymous
1737116103
Anonymous
Я пытаюсь создать проект Spring Boot с отдельными контейнерами для служб postgres и pgadmin, используя docker Compose. Мне нужно отправить команду ssh, чтобы запустить скрипт по созданию таблицы и поместить в нее некоторые исходные данные из контейнера pgadmin. Итак, у меня есть атрибут команды для установки openssh-server
command: ["sh", "-c", "apt-get update --assume-yes && apt-get dist-upgrade --assume-yes && apt-get install --assume-yes openssh-server && mkdir -p /var/run/sshd && /usr/sbin/sshd -D"]
но по какой-то причине он продолжает зависать на триггерах обработки для libc-bin (2.36-9+deb12u9). Я пытался установить libc-bin отдельно, удалив пакет libc-bin перед установкой openssh и некоторые другие вещи, но не смог пройти эту часть. Ниже приведен небольшой фрагмент результатов работы Docker Compose
postgres_container | Setting up dbus-session-bus-common (1.14.10-1~deb12u1) ...
postgres_container | Setting up procps (2:4.0.2-3) ...
postgres_container | Setting up libx11-6:amd64 (2:1.8.4-2+deb12u2) ...
postgres_container | Setting up dbus-system-bus-common (1.14.10-1~deb12u1) ...
postgres_container | Setting up libfido2-1:amd64 (1.12.0-2+b1) ...
postgres_container | Setting up libxmuu1:amd64 (2:1.1.3-3) ...
postgres_container | Setting up dbus-bin (1.14.10-1~deb12u1) ...
postgres_container | Setting up ncurses-term (6.4-4) ...
postgres_container | Setting up libtirpc3:amd64 (1.3.3+ds-1) ...
postgres_container | Setting up openssh-client (1:9.2p1-2+deb12u4) ...
postgres_container | Setting up libxext6:amd64 (2:1.3.4-1+b1) ...
postgres_container | Setting up dbus-daemon (1.14.10-1~deb12u1) ...
postgres_container | Setting up dbus (1.14.10-1~deb12u1) ...
postgres_container | invoke-rc.d: could not determine current runlevel
postgres_container | invoke-rc.d: policy-rc.d denied execution of start.
postgres_container | Setting up xauth (1:1.1.2-1) ...
postgres_container | Setting up libnsl2:amd64 (1.3.0-2) ...
postgres_container | Setting up libpam-systemd:amd64 (252.33-1~deb12u1) ...
postgres_container | debconf: unable to initialize frontend: Dialog
postgres_container | debconf: (TERM is not set, so the dialog frontend is not usable.)
postgres_container | debconf: falling back to frontend: Readline
postgres_container | debconf: unable to initialize frontend: Readline
postgres_container | debconf: (This frontend requires a controlling tty.)
postgres_container | debconf: falling back to frontend: Teletype
postgres_container | Setting up openssh-sftp-server (1:9.2p1-2+deb12u4) ...
postgres_container | Setting up dbus-user-session (1.14.10-1~deb12u1) ...
postgres_container | Setting up libwrap0:amd64 (7.6.q-32) ...
postgres_container | Setting up openssh-server (1:9.2p1-2+deb12u4) ...
postgres_container | debconf: unable to initialize frontend: Dialog
postgres_container | debconf: (TERM is not set, so the dialog frontend is not usable.)
postgres_container | debconf: falling back to frontend: Readline
postgres_container | debconf: unable to initialize frontend: Readline
postgres_container | debconf: (This frontend requires a controlling tty.)
postgres_container | debconf: falling back to frontend: Teletype
postgres_container |
postgres_container | Creating config file /etc/ssh/sshd_config with new version
postgres_container | Creating SSH2 RSA key; this may take some time ...
postgres_container | 3072 SHA256:jI+RJuOAgrjffqZBKpl5/6oTAiTr0E088dFtrFoskzY root@544ed6f9a2ba (RSA)
postgres_container | Creating SSH2 ECDSA key; this may take some time ...
postgres_container | 256 SHA256:9MJycbVeJG4GrdCR8w35+I+tinw5cgbFVoH3s/1crXk root@544ed6f9a2ba (ECDSA)
postgres_container | Creating SSH2 ED25519 key; this may take some time ...
postgres_container | 256 SHA256:MdtQeo0K5mHXMOdxAKB8QI+i749q4B//2WW9UziVTC0 root@544ed6f9a2ba (ED25519)
postgres_container | invoke-rc.d: could not determine current runlevel
postgres_container | invoke-rc.d: policy-rc.d denied execution of start.
postgres_container | Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.
postgres_container | Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service → /lib/systemd/system/ssh.service.
postgres_container | Processing triggers for libc-bin (2.36-9+deb12u9) ...
Gracefully stopping... (press Ctrl+C again to force)
[+] Stopping 1/2
✔ Container pgadmin_container Stopped 0.0s
- Container postgres_container Stopping 0.2s
dependency failed to start: container postgres_container is unhealthy
А вот мой файл компоновки докера:
services:
postgres:
image: 'postgres:latest'
container_name: "${DB_CONTAINER_NAME}"
restart: always
networks:
- default
environment:
POSTGRES_HOST: "${DB_HOST}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_USER: "${DB_USER}"
POSTGRES_DB: "${DB_NAME}"
POSTGRES_TABLE_NAME: "${DB_TABLE_NAME}"
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
- postgres-data:/var/lib/postgresql/data/
- ./postgres-data/scripts:/scripts
command: ["sh", "-c", "apt-get update --assume-yes && apt-get dist-upgrade --assume-yes && apt-get install --assume-yes openssh-server && mkdir -p /var/run/sshd && /usr/sbin/sshd -D"]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
pgadmin:
image: 'docker.io/dpage/pgadmin4:latest'
container_name: "${PGADMIN_CONTAINER_NAME}"
user: root
depends_on:
postgres:
condition: service_healthy
restart: always
networks:
- default
environment:
PGADMIN_SERVERS_NAME: "${PGADMIN_SERVERS_NAME}"
PGADMIN_DEFAULT_EMAIL: "${PGADMIN_DEFAULT_EMAIL}"
PGADMIN_DEFAULT_PASSWORD: "${PGADMIN_DEFAULT_PASSWORD}"
POSTGRES_HOST: "${DB_HOST}"
POSTGRES_PORT: "${DB_PORT}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_USER: "${DB_USER}"
POSTGRES_DB: "${DB_NAME}"
USERS_TABLE_NAME: "${DB_TABLE_NAME}"
ports:
- "${PGADMIN_CLIENT_PORT}:80"
volumes:
- pgadmin-data:/var/lib/pgadmin/
- ./pgadmin-data/scripts:/scripts
healthcheck:
test: ["CMD-SHELL", "ping -c4 postgres"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
entrypoint: ["/bin/sh", "-c", "/scripts/entrypoint.sh"]
volumes:
postgres-data:
pgadmin-data:
networks:
default:
name: "${PROJECT_NETWORK_NAME}"
driver: bridge
Подробнее здесь: [url]https://stackoverflow.com/questions/79364718/libc-bin-getting-stuck-in-docker-container-debian[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия