From f5f8ef8429dd7c3d9bf9df5ab916e792d8ce50ba Mon Sep 17 00:00:00 2001 From: hibobmaster <32976627+hibobmaster@users.noreply.github.com> Date: Wed, 22 Mar 2023 23:07:14 +0800 Subject: [PATCH] update .dockerignore and add libmagic dependency to alpine dockerbuild --- .dockerignore | 4 ++-- Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index 80c146c..ce10b6f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,8 +3,8 @@ images *.md Dockerfile .dockerignore -.config.json -.config.json.sample +config.json +config.json.sample bot bot.log venv diff --git a/Dockerfile b/Dockerfile index cb1c158..edee77e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM python:3.11-alpine as pybuilder RUN sed -i 's|v3\.\d*|edge|' /etc/apk/repositories -RUN apk update && apk add --no-cache olm-dev gcc musl-dev tzdata +RUN apk update && apk add olm-dev gcc musl-dev tzdata libmagic COPY requirements.txt /requirements.txt RUN pip3 install --user -r /requirements.txt && rm /requirements.txt FROM python:3.11-alpine as runner -RUN apk update && apk add --no-cache olm-dev +RUN apk update && apk add olm-dev libmagic COPY --from=pybuilder /root/.local /usr/local COPY --from=pybuilder /usr/share/zoneinfo /usr/share/zoneinfo COPY . /app