Skip to content

Commit

Permalink
made docker images a bit more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
gwiedeman committed Jun 12, 2023
1 parent 61e174f commit 594fb26
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 38 deletions.
39 changes: 21 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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]
41 changes: 21 additions & 20 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 594fb26

Please sign in to comment.