Skip to content

Commit

Permalink
docker: switch back to debian base image
Browse files Browse the repository at this point in the history
Alpine builds are taking a very long time, possibly due to python dependencies
lacking pre-built musl wheels [1]. Moreover resulting image sizes are
comparable so benefit of alpine here is ambiguous at best.

[1] https://megamorf.gitlab.io/2020/05/06/why-it-s-better-not-to-use-alpine-linux-for-python-projects/
  • Loading branch information
mik3y committed Jul 20, 2022
1 parent 06f2682 commit 418f4cf
Showing 1 changed file with 16 additions and 22 deletions.
38 changes: 16 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3-alpine
FROM python:3.10.5-bullseye

RUN mkdir /app
WORKDIR /app
Expand All @@ -9,27 +9,21 @@ ENV SHELL=/bin/sh \
KEGBOT_IN_DOCKER=True \
KEGBOT_ENV=debug

RUN apk update && \
apk add --no-cache \
bash \
curl \
libjpeg \
libjpeg-turbo \
openjpeg \
mariadb-connector-c-dev \
libpq && \
apk add --no-cache --virtual _build-deps \
build-base \
mariadb-dev \
postgresql-dev \
libjpeg-turbo-dev \
zlib-dev \
py-gevent \
libffi-dev \
musl-dev \
python3-dev \
openssl-dev \
cargo
RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
curl \
libffi-dev \
libfreetype6-dev \
libfribidi-dev \
libharfbuzz-dev \
libjpeg-turbo-progs \
libjpeg62-turbo-dev \
liblcms2-dev \
libopenjp2-7-dev \
libtiff5-dev \
libwebp-dev \
libssl-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

RUN pip install poetry

Expand Down

0 comments on commit 418f4cf

Please sign in to comment.