-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 991 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (23 loc) · 991 Bytes
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
FROM --platform=linux/amd64 python:3.8-slim
# 必要なパッケージのインストール
RUN apt-get update && \
apt-get install -y wget curl unzip && \
# Firefoxのインストール(ESR版)
apt-get install -y firefox-esr && \
# geckodriverのインストール(固定バージョン)
wget -O /tmp/geckodriver.tar.gz "https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-linux64.tar.gz" && \
tar -xzf /tmp/geckodriver.tar.gz -C /usr/local/bin && \
chmod +x /usr/local/bin/geckodriver && \
rm /tmp/geckodriver.tar.gz && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# 作業ディレクトリ
WORKDIR /app
# 必要なファイルをコピー
COPY requirements.txt ./
COPY . .
# Pythonパッケージのインストール
RUN pip install --no-cache-dir -r requirements.txt
# 必要なディレクトリを作成
RUN mkdir -p url log csv html
# デフォルトコマンド
CMD ["python", "get_race_url.py"]