mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-19 06:02:01 +08:00
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.
This commit is contained in:
parent
3e0a0431d9
commit
f24617f469
@ -12,7 +12,9 @@ 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
|
||||
@ -20,3 +22,4 @@ COPY --from=builder /build/config.json /etc/config.json
|
||||
WORKDIR /opt
|
||||
VOLUME /opt/exhaust
|
||||
CMD ["/usr/bin/webp-server", "--config", "/etc/config.json"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user