Libc-bin застревает в докер-контейнере DebianLinux

Ответить
Anonymous
 Libc-bin застревает в докер-контейнере Debian

Сообщение 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


Подробнее здесь: https://stackoverflow.com/questions/793 ... ner-debian
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Linux»