浏览代码

Update Docker image to Alpine 3.16

Tulir Asokan 3 年之前
父节点
当前提交
a745da8124
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      Dockerfile

+ 5 - 6
Dockerfile

@@ -1,16 +1,15 @@
-FROM alpine:3.15
+FROM docker.io/alpine:3.16
 
 ARG TARGETARCH=amd64
 
 RUN apk add --no-cache \
       python3 py3-pip py3-setuptools py3-wheel \
-      py3-virtualenv \
       py3-pillow \
       py3-aiohttp \
       py3-magic \
       py3-ruamel.yaml \
       py3-commonmark \
-      py3-prometheus-client \
+      #py3-prometheus-client \
       py3-paho-mqtt \
       # Other dependencies
       ca-certificates \
@@ -31,13 +30,13 @@ COPY requirements.txt /opt/mautrix-instagram/requirements.txt
 COPY optional-requirements.txt /opt/mautrix-instagram/optional-requirements.txt
 WORKDIR /opt/mautrix-instagram
 RUN apk add --virtual .build-deps python3-dev libffi-dev build-base \
- && pip3 install -r requirements.txt -r optional-requirements.txt \
+ && pip3 install --no-cache-dir -r requirements.txt -r optional-requirements.txt \
  && apk del .build-deps
 
 COPY . /opt/mautrix-instagram
-RUN apk add git && pip3 install .[all] && apk del git \
+RUN apk add git && pip3 install --no-cache-dir .[all] && apk del git \
   # This doesn't make the image smaller, but it's needed so that the `version` command works properly
-  && cp mautrix_instagram/example-config.yaml . && rm -rf mautrix_instagram
+  && cp mautrix_instagram/example-config.yaml . && rm -rf mautrix_instagram .git build
 
 ENV UID=1337 GID=1337
 VOLUME /data