Skip to content

Instantly share code, notes, and snippets.

@modalsoul
Created November 5, 2018 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save modalsoul/1dc7cca5f37b73728e1986e61611872b to your computer and use it in GitHub Desktop.
Save modalsoul/1dc7cca5f37b73728e1986e61611872b to your computer and use it in GitHub Desktop.
FROM python:3.6-alpine3.8
ENV APP_ROOT=${APP_ROOT:-/opt/app}
# update apk repo
RUN echo "http://dl-4.alpinelinux.org/alpine/v3.8/main" >> /etc/apk/repositories && \
echo "http://dl-4.alpinelinux.org/alpine/v3.8/community" >> /etc/apk/repositories
# install chromedriver
RUN apk update
RUN apk add chromium chromium-chromedriver
RUN apk add ttf-freefont
# install selenium
RUN pip install selenium
# install font
RUN mkdir /noto
ADD https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip /noto
WORKDIR /noto
RUN unzip NotoSansCJKjp-hinted.zip && \
mkdir -p /usr/share/fonts/noto && \
cp *.otf /usr/share/fonts/noto && \
chmod 644 -R /usr/share/fonts/noto/ && \
fc-cache -fv
WORKDIR $APP_ROOT/scraping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment