From c8fa077df7d01de3c62c2b64e3fc2830dc9b22fd Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Mon, 31 Oct 2022 17:10:55 +0000 Subject: [PATCH] docker initial files --- .dockerignore | 17 +++++++++++++++++ Dockerfile | 20 ++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a4d2bbb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,17 @@ +logs/ +browsertrix-tmp/ +tmp*/ +temp/ +.DS_Store +__pycache__/ +local_archive/ +config*.json +config.json +*.env +credentials.json +secrets/ +instaloader/ +instaloader.session +vk_config*.json +anon* +geckodriver.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..61a82c2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +From python:3.10 + +WORKDIR /usr/src/app + +COPY . . + + +# TODO: use custom ffmpeg builds instead of apt-get install +RUN pip install --upgrade pip && \ + pip install pipenv && \ + apt-get update && \ + apt-get install -y gcc ffmpeg fonts-noto firefox-esr && \ + wget https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz && \ + tar -xvzf geckodriver* -C /usr/bin && \ + chmod +x /usr/bin/geckodriver && \ + rm geckodriver-v* && \ + export PATH=$PATH:/usr/bin/ && \ + pipenv install --python=3.10 + +CMD ["pipenv", "run", "python", "auto_archive.py"] \ No newline at end of file