大幅优化镜像体积

1. 使用 docker 预构建的必需文件,而不是安装全量依赖
2. 使用 zerofree 清除镜像无效数据
将 janus 日志级别调整为2
This commit is contained in:
mofeng-git
2025-03-10 10:56:16 +00:00
parent e375e41fb6
commit 48fe790897
4 changed files with 31 additions and 57 deletions

View File

@@ -62,6 +62,7 @@ RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.lis
/run/kvmd \
/tmp/kvmd-nginx \
&& touch /run/kvmd/ustreamer.sock \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/lib /tmp/wheel

View File

@@ -47,6 +47,7 @@ RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.lis
libspeex-dev \
libspeexdsp-dev \
libusb-1.0-0-dev \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
COPY build/cargo_config /tmp/config
@@ -69,7 +70,7 @@ RUN --security=insecure pip config set global.index-url https://pypi.tuna.tsingh
more-itertools multidict netifaces packaging passlib pillow ply psutil \
pycparser pyelftools pyghmi pygments pyparsing pyotp qrcode requests \
semantic-version setproctitle six spidev tabulate urllib3 wrapt xlib \
yarl pyserial pyyaml zstandard supervisor
yarl pyserial pyyaml zstandard supervisor pyfatfs
# 编译安装 libnice、libsrtp、libwebsockets 和 janus-gateway
RUN git clone --depth=1 https://gitlab.freedesktop.org/libnice/libnice /tmp/libnice \