From e5e36f823a0c3bb513d6ebd6c07eb04ae2bb60f9 Mon Sep 17 00:00:00 2001 From: salty Date: Wed, 16 Mar 2022 01:01:13 +0100 Subject: [PATCH] fixed arm64 build and slimmed down image Credits for the slimming goes to https://github.com/chazlarson --- Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6362a8f4..34205f8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,20 @@ FROM python:3.9-slim ENV TINI_VERSION v0.19.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini +COPY . / RUN echo "**** install system packages ****" \ && apt-get update \ && apt-get upgrade -y --no-install-recommends \ && apt-get install -y tzdata --no-install-recommends \ - && apt-get install -y gcc g++ libxml2-dev libxslt-dev libz-dev -COPY requirements.txt / -RUN echo "**** install python packages ****" \ + && apt-get install -y gcc g++ libxml2-dev libxslt-dev libz-dev wget \ + && wget -O /tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-"$(dpkg --print-architecture | awk -F- '{ print $NF }')" \ + && chmod +x /tini \ && pip3 install --no-cache-dir --upgrade --requirement /requirements.txt \ - && apt-get autoremove -y \ + && apt-get --purge autoremove wget gcc g++ libxml2-dev libxslt-dev libz-dev -y \ && apt-get clean \ + && apt-get update \ + && apt-get check \ + && apt-get -f install \ + && apt-get autoclean \ && rm -rf /requirements.txt /tmp/* /var/tmp/* /var/lib/apt/lists/* -COPY . / VOLUME /config ENTRYPOINT ["/tini", "-s", "python3", "plex_meta_manager.py", "--"]