Reputation: 23
Trying to create a docker container which would run scrapy spiders. I haven't seen any clear examples of how it is done.
I've tried multiple changes in the Dockerfile, yet I'm still doing something wrong. Can anyone assist?
Dockerfile:
FROM amazonlinux
COPY . /app
RUN yum -y update
RUN yum -y install python3
RUN yum -y install python3-pip
RUN yum install python-devel -y
RUN yum install gcc gcc-devel -y
RUN yum install libxml2 libxml2-devel -y
RUN yum install libxslt libxslt-devel -y
RUN yum install openssl openssl-devel -y
RUN yum install libffi libffi-devel -y
RUN pip3 install lxml
RUN pip3 install scrapy
RUN pip3 install -r /app/requirements.txt
WORKDIR /app
ENTRYPOINT ["python3", "/app/spiders/start.py"]
This is what the terminal gives as error:
https://i.sstatic.net/FRC7D.jpg
Upvotes: 0
Views: 453
Reputation: 1455
Actually, it is not docker, it is python error.
you installing python-devel
but using python3
so you need to replace string with python devel
to RUN yum install python3-devel -y
Upvotes: 1