![安装的包 gconf-service 不存在?](https://linux22.com/image/1551188/%E5%AE%89%E8%A3%85%E7%9A%84%E5%8C%85%20gconf-service%20%E4%B8%8D%E5%AD%98%E5%9C%A8%EF%BC%9F.png)
让我们考虑以下设置来安装 Ubuntu 包gconf-service
。
Dockerfile
:
FROM ubuntu:16.04
RUN apt update && apt-get -y install gconf-service
构建图像并创建带有附加终端的容器:
docker build -t foo .
docker run -it foo bash
在构建过程中,gconf-service
似乎安装了:
Setting up gconf-service (3.2.6-3ubuntu6) ..
然后我们观察到以下效果。为什么?
root@c5cc80362316:/# gconf-service
bash: gconf-service: command not found
root@c5cc80362316:/# which gconf-service
root@c5cc80362316:/# echo $?
1
root@c5cc80362316:/# apt list --installed | grep gconf-service
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
gconf-service/xenial,now 3.2.6-3ubuntu6 amd64 [installed]
gconf-service-backend/xenial,now 3.2.6-3ubuntu6 amd64 [installed,automatic]