diff --git a/Dockerfile b/Dockerfile index 1db98a1..4830809 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,21 +13,24 @@ ADD . /mailbagit/ # manually add to $PYTHONPATH because https://github.com/python/importlib_metadata/issues/364 ENV PYTHONPATH=/mailbagit -RUN apt-get -y update && \ - apt-get -y upgrade && \ - apt-get install -y build-essential && \ - apt-get install -y libgtk-3-dev && \ - apt-get install -y python3-pip && \ - apt-get install -y curl && \ - \ - pip install libpff-python==20211114 && \ - \ - curl -L -o /tmp/wkhtmltox_0.12.6-1.focal_amd64.deb \ - https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb && \ - apt-get install -y /tmp/wkhtmltox_0.12.6-1.focal_amd64.deb && \ - \ - curl -L -o /tmp/google-chrome-stable_current_amd64.deb \ - https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ - apt-get install -y /tmp/google-chrome-stable_current_amd64.deb && \ - \ - pip install -e .[pst] +RUN apt-get -y update +RUN apt-get -y upgrade +RUN apt-get install -y curl + +# needed to build some python libraries +RUN apt-get install -y gcc dpkg-dev + +# wkhtmltopdf deps +RUN apt-get install -y xfonts-75dpi xfonts-base + +RUN pip install libpff-python==20211114 + +RUN curl -L -o /tmp/google-chrome-stable_current_amd64.deb \ + https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb +RUN apt-get install -y /tmp/google-chrome-stable_current_amd64.deb + +RUN curl -L -o /tmp/wkhtmltox_0.12.6-1.buster_amd64.deb \ + https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb +RUN dpkg -i /tmp/wkhtmltox_0.12.6-1.buster_amd64.deb + +RUN pip install -e .[pst] diff --git a/Dockerfile.production b/Dockerfile.production index 1f58ebe..6e5b438 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -6,23 +6,24 @@ ENV TZ=America/New_York \ MAILBAGIT_LOG_LEVEL=info \ IN_CONTAINER=true -RUN apt-get -y update && \ - apt-get -y upgrade && \ - apt-get install -y build-essential && \ - apt-get install -y libgtk-3-dev && \ - apt-get install -y gcc && \ - apt-get install -y python3-pip && \ - apt-get install -y curl && \ - apt-get install -y xfonts-75dpi xfonts-base && \ - \ - pip install libpff-python==20211114 && \ - \ - curl -L -o /tmp/wkhtmltox_0.12.6-1.buster_amd64.deb \ - https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb && \ - dpkg -i /tmp/wkhtmltox_0.12.6-1.buster_amd64.deb && \ - \ - curl -L -o /tmp/google-chrome-stable_current_amd64.deb \ - https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ - apt-get install -y /tmp/google-chrome-stable_current_amd64.deb && \ - \ - pip install mailbagit[pst] -U +RUN apt-get -y update +RUN apt-get -y upgrade +RUN apt-get install -y curl + +# needed to build some python libraries +RUN apt-get install -y gcc dpkg-dev + +# wkhtmltopdf deps +RUN apt-get install -y xfonts-75dpi xfonts-base + +RUN pip install libpff-python==20211114 + +RUN curl -L -o /tmp/google-chrome-stable_current_amd64.deb \ + https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb +RUN apt-get install -y /tmp/google-chrome-stable_current_amd64.deb + +RUN curl -L -o /tmp/wkhtmltox_0.12.6-1.buster_amd64.deb \ + https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb +RUN dpkg -i /tmp/wkhtmltox_0.12.6-1.buster_amd64.deb + +RUN pip install mailbagit -U