From f24617f469fde75c781292ac837694f9ddc36182 Mon Sep 17 00:00:00 2001 From: wood chen Date: Wed, 23 Oct 2024 01:08:01 +0800 Subject: [PATCH] chore(Dockerfile): Update Dockerfile to use Alpine Linux and refactor package management Update Dockerfile to use Alpine Linux for base image and refactor package management to use apk instead of apt. Also, clean up cache directories after installing packages. --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d57c185..0bb59df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,14 @@ RUN cd /build && sed -i "s|\"\"|\"${EXHAUST_PATH}\"|g" config.json \ FROM alpine:latest -RUN apt update && apt install --no-install-recommends libvips ca-certificates -y && rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/apt/archives/* - +RUN apk update && \ + apk add --no-cache libvips ca-certificates && \ + rm -rf /var/cache/apk/* + COPY --from=builder /build/webp-server /usr/bin/webp-server COPY --from=builder /build/config.json /etc/config.json - + WORKDIR /opt VOLUME /opt/exhaust CMD ["/usr/bin/webp-server", "--config", "/etc/config.json"] +