From 4d37857ef5f283ea4350810df3b83612e9fe2326 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 21 May 2021 21:53:51 +0300
Subject: [PATCH] Replace base image with Debian.

There are binary wheels of lxml for libc based OSes.
---
 Dockerfile | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 38ee10e..b8d8228 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,22 +1,24 @@
 # hadolint ignore=DL3006
 FROM registry.shore.co.il/cron as supersonic
 
-FROM registry.hub.docker.com/library/python:3.6-alpine3.13
+FROM registry.hub.docker.com/library/python:3.6-slim-buster
 COPY --from=supersonic /usr/local/bin/supersonic /usr/local/bin/
-# hadolint ignore=DL3018
-RUN apk add --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
+# hadolint ignore=DL3008,DL3013
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+        git \
         gosu \
-    ;
-# hadolint ignore=DL3013
-RUN pip install --no-cache-dir pipenv
+        libxml2 \
+        libxslt1.1 \
+        procps \
+        wget \
+    && \
+    rm -rf /tmp/* /var/tmp/* /var/cache/apt/archives/* /var/lib/apt/lists/* && \
+    pip install --no-cache-dir pipenv
 WORKDIR /poquita
 ENV HOME /poquita
 COPY Pipfile* ./
-# hadolint ignore=DL3018
-RUN apk add --update --no-cache --virtual .lxml-build build-base git libxslt-dev && \
-    pipenv install --deploy --system && \
-    apk del .lxml-build && \
-    apk add --update --no-cache --virtual .lxml-runtime libxml2 libxslt
+RUN pipenv install --deploy --system
 RUN mkdir --mode 777 db Podcasts
 COPY --chown=root:root crontab ./
 COPY --chown=root:root poca.xml ./
-- 
GitLab