Docker 容器中找不到 .deb 包,即使从容器内部安装也是如此

Docker 容器中找不到 .deb 包,即使从容器内部安装也是如此

我想globalprotect在 Ubuntu docker 镜像中安装 VPN 客户端。我已经下载了 deb 文件,并已成功将其安装在主机(也是 Ubuntu)上,如下所示:

sudo apt install ~/docker/ashutepconnect/assets/myvpn/GlobalProtect_deb-6.0.4.1-28.deb

我可以使用 进行连接globalprotect connect --portal [portal]

继续查看图片,这是我的 dockerfile:(位于~/docker/ashutepconnect/

FROM ubuntu
MAINTAINER Ashkan <[email protected]>

# Skip prompts
ARG DEBIAN_FRONTEND=noninteractive

# Update packages
RUN apt-get update; apt-get dist-upgrade -y

# Install packages
RUN apt-get install -y neofetch ssh
COPY assets /assets
RUN apt-get install -y /assets/myvpn/GlobalProtect_deb-6.0.4.1-28.deb
# note: you must log into the vpn when you start this

并且使用 成功构建docker build -t ashutepconnect:1.3 .

但是,当我用图像启动容器并尝试使用时globalprotect,找不到它。在容器内部,当我尝试时dpkg -L globalprotect,我得到以下信息:

/.
/opt
/opt/paloaltonetworks
/opt/paloaltonetworks/globalprotect
/opt/paloaltonetworks/globalprotect/pre_exec_gps.sh
/opt/paloaltonetworks/globalprotect/libwaheap.so.4
/opt/paloaltonetworks/globalprotect/gpa.service
/opt/paloaltonetworks/globalprotect/libwaapi.so.4.3.2384.0
/opt/paloaltonetworks/globalprotect/libwaresource.so
/opt/paloaltonetworks/globalprotect/PanGPS
/opt/paloaltonetworks/globalprotect/PanGPA
/opt/paloaltonetworks/globalprotect/PanGpHipMp
/opt/paloaltonetworks/globalprotect/gpshow.sh
/opt/paloaltonetworks/globalprotect/libwalocal.so.4.3.2384.0
/opt/paloaltonetworks/globalprotect/sign
/opt/paloaltonetworks/globalprotect/sign/PanGPS-sha384.sig
/opt/paloaltonetworks/globalprotect/sign/globalprotect-sha384.sig
/opt/paloaltonetworks/globalprotect/sign/gp-public.pem
/opt/paloaltonetworks/globalprotect/sign/PanGpHipMp-sha384.sig
/opt/paloaltonetworks/globalprotect/sign/PanGpHip-sha384.sig
/opt/paloaltonetworks/globalprotect/sign/PanGPA-sha384.sig
/opt/paloaltonetworks/globalprotect/libwautils.so.4.3.2384.0
/opt/paloaltonetworks/globalprotect/globalprotect
/opt/paloaltonetworks/globalprotect/gpd
/opt/paloaltonetworks/globalprotect/license.cfg
/opt/paloaltonetworks/globalprotect/PanMSInit.sh
/opt/paloaltonetworks/globalprotect/gp_support.sh
/opt/paloaltonetworks/globalprotect/PanGpHip
/opt/paloaltonetworks/globalprotect/gpd.service
/usr
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/globalprotect.1.gz
/opt/paloaltonetworks/globalprotect/libwautils.so.4
/opt/paloaltonetworks/globalprotect/libwalocal.so
/opt/paloaltonetworks/globalprotect/libwalocal.so.4
/opt/paloaltonetworks/globalprotect/libwaapi.so
/opt/paloaltonetworks/globalprotect/libwaapi.so.4
/opt/paloaltonetworks/globalprotect/libwautils.so
/opt/paloaltonetworks/globalprotect/libwaheap.so

这正是我从主机获得的。我甚至可以从apt remove globalprotect容器中删除包,然后使用来自的文件重新安装它/asset

我注意到的唯一区别是,在主机中,ls /usr/bin/ | grep globalprotect返回globalprotect,但容器中的相同命令没有返回任何内容。为什么包二进制文件没有添加到/usr/bin

相关内容