Answer the question
In order to leave comments, you need to log in
Why aren't all dependencies from requirements.txt installed inside the Docker container?
There are such files
version: '3'
services:
postgres:
image: postgres:11.3-alpine
container_name: postgres01
networks:
- net
volumes:
- ./postgres-data:/var/lib/postgresql/data
redis:
image: redis:5.0.5-alpine
container_name: redis01
networks:
- net
volumes:
- ./redis-data:/data
parser:
build: ./
container_name: parser
depends_on:
- postgres
- redis
volumes:
- ./:/parser
restart: always
networks:
- net
networks:
net:
FROM python:3.7.3
WORKDIR /parser
ADD requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
ADD . .
# ENTRYPOINT [ "python", "./start.py" ]
RUN python start.py
asn1crypto==0.24.0
attrs==19.1.0
Automat==0.7.0
cachetools==3.1.1
certifi==2019.3.9
cffi==1.12.3
chardet==3.0.4
constantly==15.1.0
cryptography==2.7
cssselect==1.0.3
google-api-core==1.11.1
google-auth==1.6.3
google-cloud-bigquery==1.13.0
google-cloud-core==1.0.1
google-resumable-media==0.3.2
googleapis-common-protos==1.6.0
hyperlink==19.0.0
idna==2.8
incremental==17.5.0
lxml==4.3.3
parsel==1.5.1
peewee==3.9.5
protobuf==3.8.0
psycopg2-binary==2.8.2
pyasn1==0.4.5
pyasn1-modules==0.2.5
pycparser==2.19
PyDispatcher==2.0.5
PyHamcrest==1.9.0
pyOpenSSL==19.0.0
pytz==2019.1
queuelib==1.5.0
redis==3.2.1
requests==2.22.0
rsa==4.0
Scrapy==1.6.0
service-identity==18.1.0
six==1.12.0
Twisted==19.2.0
urllib3==1.25.3
w3lib==1.20.0
zope.interface==4.6.0
ModuleNotFoundError: No module named 'redis'
Answer the question
In order to leave comments, you need to log in
change ADD in docker to COPY
Requirements.txt to replace Pipfile, according to modern standards (optional)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question