You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
FROM python:3.10
|
|
|
|
|
|
|
|
# Install Python and pip
|
|
|
|
RUN apt-get update && apt-get install -y python3 python3-pip && apt install nano
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
wget unzip \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& wget https://storage.googleapis.com/chrome-for-testing-public/124.0.6367.60/linux64/chromedriver-linux64.zip \
|
|
|
|
&& unzip chromedriver-linux64.zip \
|
|
|
|
&& mv chromedriver-linux64/chromedriver /usr/local/bin/ \
|
|
|
|
&& chmod +x /usr/local/bin/chromedriver
|
|
|
|
|
|
|
|
# 安裝Google Chrome
|
|
|
|
RUN 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" | tee /etc/apt/sources.list.d/google-chrome.list \
|
|
|
|
&& apt-get update && apt-get install -y \
|
|
|
|
google-chrome-stable \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set the working directory in the container
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# Copy the dependencies file to the working directory
|
|
|
|
COPY requirements.txt .
|
|
|
|
|
|
|
|
# Install any dependencies
|
|
|
|
RUN pip3 install -r requirements.txt
|
|
|
|
|
|
|
|
# Copy the content of the local src directory to the working directory in the container
|
|
|
|
COPY . .
|