From bbd646a7ec9f05fe29db1f3f25c3a2c3575df75d Mon Sep 17 00:00:00 2001 From: classabbyamp <5366828+classabbyamp@users.noreply.github.com> Date: Thu, 7 Oct 2021 02:57:36 -0400 Subject: [PATCH] move docker image to void linux (#435) --- CHANGELOG.md | 1 + Dockerfile | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c18e081..a4fa678 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - a new way to support qrm's development. ### Changed - Changed the licence to LiLiQ-Rplus-1.1. +- Moved official Docker image to Void Linux. ### Fixed - Issue where the help command errored. diff --git a/Dockerfile b/Dockerfile index 8485a3f..e51aa71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-slim +FROM voidlinux/voidlinux COPY . /app WORKDIR /app @@ -6,13 +6,12 @@ WORKDIR /app ENV PYTHON_BIN python3 RUN \ - apt-get update && \ - echo "**** install runtime packages ****" && \ - apt-get install -y --no-install-recommends \ - libcairo2 \ - libjpeg62-turbo \ - python-lxml \ - && \ + echo "**** update packages ****" && \ + xbps-install -Suy && \ + echo "**** install system packages ****" && \ + export runtime_deps='cairo libjpeg-turbo' && \ + export runtime_pkgs="${runtime_deps} python3-pip python3" && \ + xbps-install -y $runtime_pkgs && \ echo "**** install pip packages ****" && \ pip3 install -U pip setuptools wheel && \ pip3 install -r requirements.txt && \ @@ -20,6 +19,12 @@ RUN \ rm -rf \ /root/.cache \ /tmp/* \ - /var/lib/apt/lists/* + /var/cache/xbps/* + +ARG UID +ENV UID=${UID:-1000} +ARG GID +ENV GID=${GID:-1000} +USER $UID:$GID CMD ["/bin/sh", "run.sh", "--pass-errors", "--no-botenv"]