dpkg: проблемы с зависимостями препятствуют настройке

я использую dockerfileдля создания образа:

      FROM ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update
COPY ./scratch-desktop_3.3.0_amd64.deb /opt/scratch3-desktop.deb
RUN dpkg -i /opt/scratch3-desktop.deb
RUN apt-get install -f

CMD [ "scratch-desktop" ]

Но когда я использую docker-compose buildкоманда, вызывает ошибку на этапе установки пакета Debian,

      dpkg: dependency problems prevent configuration of scratch-desktop:
 scratch-desktop depends on libgtk-3-0; however:
  Package libgtk-3-0 is not installed.
 scratch-desktop depends on libnotify4; however:
  Package libnotify4 is not installed.
 scratch-desktop depends on libnss3; however:
  Package libnss3 is not installed.
 scratch-desktop depends on libxss1; however:
  Package libxss1 is not installed.
 scratch-desktop depends on libxtst6; however:
  Package libxtst6 is not installed.
 scratch-desktop depends on xdg-utils; however:
  Package xdg-utils is not installed.
 scratch-desktop depends on kde-cli-tools | kde-runtime | trash-cli | libglib2.0-bin | gvfs-bin; however:
  Package kde-cli-tools is not installed.
  Package kde-runtime is not installed.
  Package trash-cli is not installed.
  Package libglib2.0-bin is not installed.
  Package gvfs-bin is not installed.

dpkg: error processing package scratch-desktop (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 scratch-desktop
ERROR: Service 'scratch' failed to build: The command '/bin/sh -c dpkg -i /opt/scratch3-desktop.deb' returned a non-zero code: 1

1 ответ

Использовать

      RUN apt-get install -y /opt/scratch3-desktop.deb

вместо RUN dpkg -i ....

Другие вопросы по тегам