Working and up to date. WIP misc manual actions
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -1,5 +1,6 @@
|
||||
FROM python:latest
|
||||
|
||||
ENV TZ Euopre/Zurich
|
||||
RUN echo "deb http://deb.debian.org/debian/ unstable main contrib non-free" >> /etc/apt/sources.list
|
||||
RUN apt-get update && apt-get install -y \
|
||||
evince \
|
||||
@@ -9,6 +10,7 @@ xauth wget tar firefox \
|
||||
ghostscript
|
||||
# for compression
|
||||
|
||||
|
||||
# Download gecko (firefox) driver for selenium
|
||||
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz
|
||||
RUN tar -x geckodriver -zf geckodriver-v0.31.0-linux64.tar.gz -O > /usr/bin/geckodriver
|
||||
@@ -16,12 +18,21 @@ RUN chmod +x /usr/bin/geckodriver
|
||||
RUN rm geckodriver-v0.31.0-linux64.tar.gz
|
||||
RUN echo "127.0.0.1 localhost" >> /etc/hosts
|
||||
|
||||
|
||||
RUN useradd --create-home --shell /bin/bash --uid 1001 autonews
|
||||
# id mapped to local user
|
||||
# home directory needed for pip package installation
|
||||
RUN mkdir -p /app/auto_news
|
||||
RUN chown -R autonews:autonews /app
|
||||
|
||||
|
||||
USER autonews
|
||||
|
||||
|
||||
COPY requirements.txt /app/
|
||||
RUN python3 -m pip install -r /app/requirements.txt
|
||||
|
||||
RUN mkdir -p /app/auto_news
|
||||
COPY app /app/auto_news
|
||||
WORKDIR /app/auto_news
|
||||
|
||||
|
||||
ENTRYPOINT ["python3", "runner.py"]
|
||||
ENTRYPOINT ["python3", "runner.py"]
|
Reference in New Issue
Block a user