DockerでGUIアプリケーションを実行するには?

DockerでGUIアプリケーションを実行するには?

以下のように、Parrot OS DockerコンテナにPacket Tracerをインストールしようとしています。これチュートリアルと私のものドッカーファイルこれで次のようになります(テスト用)。

FROM parrotsec/core
COPY PacketTracer_731_amd64.deb /root/PacketTracer_731_amd64.deb
RUN apt-get install -y /root/PacketTracer_731_amd64.deb

私がコマンドを実行すると

docker build -t gparrot .

次のエラーが発生します。

Sending build context to Docker daemon  181.1MB
Step 1/3 : FROM parrotsec/core
 ---> 167d5a59b3ce
Step 2/3 : COPY PacketTracer_731_amd64.deb /root/PacketTracer_731_amd64.deb
 ---> Using cache
 ---> 1df7860c2821
Step 3/3 : RUN apt-get install -y /root/PacketTracer_731_amd64.deb
 ---> Running in 2bbb80e41fd9

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 packettracer : Depends: sudo but it is not installable
                Depends: dialog but it is not installable
                Depends: xdg-utils but it is not installable
                Depends: gtk-update-icon-cache but it is not installable
                Depends: libgl1-mesa-glx but it is not installable
                Depends: libpulse0 but it is not installable
                Depends: libnss3 but it is not installable
                Depends: libxss1 but it is not installable
                Depends: libasound2 but it is not installable
                Depends: libxslt1.1 but it is not installable
                Depends: libxkbcommon-x11-0 but it is not installable
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt-get install -y /root/PacketTracer_731_amd64.deb' returned a non-zero code: 100

何が問題なのか、解決策を教えてください。

ベストアンサー1

デフォルトの画像parrotsec/coreはXディスプレイサーバーを提供しません。 Ubuntuの使用に関するガイドラインに従ってください。 .をapt-get使用してエントリポイントを追加し、Dockerfileに必要なポートを公開します。

おすすめ記事