-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (23 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM python:3.10-slim
RUN apt-get update && apt-get install -y gnupg curl
# Instale as dependências necessárias
RUN apt-get update && \
apt-get install -y wget unzip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Baixe e instale o Chrome
RUN apt-get update && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get install -y google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
# Baixe e instale o ChromeDriver
RUN CHROME_DRIVER_VERSION=$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE) && \
curl -o /tmp/chromedriver.zip "https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip" && \
unzip /tmp/chromedriver.zip -d /usr/local/bin/ && \
rm /tmp/chromedriver.zip
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
RUN touch shein_data.db
CMD ["python3", "crawler/shein_crawler.py"]