Docker未使用requirements.txt中的正确版本
我已经更新了requirements.txt文件中的一个版本。再次部署我的dockerDocker未使用requirements.txt中的正确版本,docker,Docker,我已经更新了requirements.txt文件中的一个版本。再次部署我的dockerdocker compose.yml后,python/docker仍在使用旧版本 在谷歌搜索之后,我做了以下几件事,但都没有帮助: 码头工人修枝 运行pip安装-r/etc/aggregators/requirements.txt——无缓存目录 这是Dockerfile中安装需求的部分: # Copy the config file and mongo certificate to the image WO
docker compose.yml
后,python/docker仍在使用旧版本
在谷歌搜索之后,我做了以下几件事,但都没有帮助:
- 码头工人修枝
- 运行pip安装-r/etc/aggregators/requirements.txt——无缓存目录
# Copy the config file and mongo certificate to the image
WORKDIR /etc/aggregators/
COPY config/${CONFIG_ENV}.pem mongo.pem
COPY requirements.txt .
COPY config/${CONFIG_ENV}.ini config.ini
COPY config/logging.conf .
# Install all of the python requirements in the image
RUN pip install -r /etc/aggregators/requirements.txt --no-cache-dir
docker-compose.yml
version: "3.2"
services:
aggregator:
restart: always
build:
context: .
args:
environement: development
volumes:
- ./:/aggregator
depends_on:
- mongodb
mongodb:
image: mongo
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
部署我的docker docker-compose.yml再次强调,python/docker仍在部署
到底如何部署?docker compose是如何关联的?“compose:docker compose.yml”已成功部署。它不相关,docker只是这样命名,我猜您是如何运行容器的;如何验证软件包版本未更新?(是卷:
还是一个显式的Python虚拟环境?)。我知道更新了什么。我将把我的docker-compose.yml添加到问题中。有一卷是我的项目本身