首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Docker中运行GUI应用程序?

如何在Docker中运行GUI应用程序?
EN

Unix & Linux用户
提问于 2020-08-09 19:23:32
回答 1查看 527关注 0票数 0

按照教程,我正试图在我的Packet容器中安装Packet,我的Dockerfile现在看起来是这样的(只是为了测试):

代码语言:javascript
复制
FROM parrotsec/core
COPY PacketTracer_731_amd64.deb /root/PacketTracer_731_amd64.deb
RUN apt-get install -y /root/PacketTracer_731_amd64.deb

当我运行命令

代码语言:javascript
复制
docker build -t gparrot .

我得到以下错误:

代码语言:javascript
复制
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

请告诉我有什么问题,以及如何解决?

EN

回答 1

Unix & Linux用户

发布于 2020-08-10 21:36:38

parrotsec/core基图不提供X显示服务器。只需遵守指南,使用ubuntu -用apt-get安装那些依赖项。在Dockerfile中添加一个入口点并公开所需的端口

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/603669

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档