ci: docker_tag=ext - Optimize Dockerfile to reduce image size (remove dev tools)
All checks were successful
build-and-push-ext / build_push (push) Successful in 23s

This commit is contained in:
4NK Dev 2025-09-21 18:09:11 +00:00
parent 719b8874df
commit 78efe3a208

View File

@ -9,15 +9,8 @@ RUN cargo build --release
FROM debian:stable-slim
RUN useradd -m -u 10001 appuser && \
apt-get update && apt-get upgrade -y && \
apt-get install -y ca-certificates dnsutils jq curl git wget telnet npm coreutils iputils-ping \
build-essential autoconf automake libtool pkg-config cmake ninja-build clang lldb lld make \
tree ncdu mc exuberant-ctags cscope vim emacs sed gawk inetutils-tools iputils-* net-tools iproute2 \
python3 python3-pip python3-dev && \
apt-get install -y golang-go && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
npm install -g wscat && \
rm -rf /var/lib/apt/lists/* /root/.npm && \
ln -s /usr/bin/python3 /usr/bin/python
apt-get install -y ca-certificates curl jq && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /app
COPY --from=builder /app/target/release/sdk_storage /usr/local/bin/sdk_storage
RUN mkdir -p /app/storage && chown -R appuser:appuser /app