小编Yon*_*ong的帖子

如何在Docker中检查是否安装了python包?

我用Dockerfile成功构建了一个容器.但是,我的代码在容器中不起作用.如果我手动安装所有包,它确实有效.我假设我弄乱了导致docker没有正确安装软件包的东西.所以,我想检查是否在Docker容器中安装了python包.检查它的最佳方法是什么?

我使用的Dockerfile:

# Update the sources list
RUN sudo apt-get update

# Install basic applications
RUN sudo apt-get install -y tar git curl nano wget dialog net-tools build-essential

# First install ZeroMQ
RUN sudo apt-get install -y libzmq-dev

# Install libevent
RUN sudo apt-get install -y libevent-dev

# Install Python and Basic Python Tools
RUN sudo apt-get install -y python python-dev python-setuptools
RUN sudo apt-get install -y python-pip 

# Add the current directory to the container
ADD . /root/code

# …
Run Code Online (Sandbox Code Playgroud)

python zeromq pyzmq docker dockerfile

6
推荐指数
1
解决办法
9017
查看次数

标签 统计

docker ×1

dockerfile ×1

python ×1

pyzmq ×1

zeromq ×1