Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplants authored Jan 31, 2023
1 parent e087755 commit 6122d40
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
FROM python:3.12.0a4
FROM python:3

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN wget -nv https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update \
&& apt-get install -y --no-install-recommends \
./google-chrome-stable_current_amd64.deb unzip \
&& rm -rf google-chrome-stable_current_amd64.deb /var/lib/apt/lists/*
google-chrome-stable \
unzip \
&& rm -rf /var/lib/apt/lists/*

# install chromedriver
RUN wget -qO /tmp/chromedriver.zip \
"http://chromedriver.storage.googleapis.com/$(wget -qO- chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip" \
&& unzip -qq /tmp/chromedriver.zip chromedriver -d /usr/local/bin/

# set display port to avoid crash
ENV DISPLAY=:99

# upgrade pip
RUN pip install --no-cache-dir -U pip

# install selenium
RUN pip install --no-cache-dir selenium pixiv-bulk-downloader chromedriver-binary-auto

ENV CHROMEDRIVER_PATH /usr/local/lib/python3.10/site-packages/chromedriver_binary
ENV PATH $CHROMEDRIVER_PATH:$PATH
RUN python -m pip install --no-cache-dir -U pip \
&& pip install --no-cache-dir pixiv-bulk-downloader

CMD ["pbd"]
ENTRYPOINT ["pbd"]

0 comments on commit 6122d40

Please sign in to comment.