- Strip builder stage from all Rust Dockerfiles; images now only contain the runtime and a pre-built binary copied from target/. - build.js: cargo builds all Rust binaries first (using all CPU cores), then copies them into Docker images. - .drone.yml: add cargo-build step before docker-build so kaniko can COPY the pre-compiled binaries without rebuilding inside the image.
17 lines
440 B
Docker
17 lines
440 B
Docker
# Runtime only — binary built externally via cargo
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates libssl3 openssh-server \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN mkdir -p /run/sshd && \
|
|
ssh-keygen -A && \
|
|
chmod 755 /etc/ssh
|
|
|
|
WORKDIR /app
|
|
COPY target/x86_64-unknown-linux-gnu/release/gitserver /app/gitserver
|
|
|
|
ENV APP_LOG_LEVEL=info
|
|
ENTRYPOINT ["/app/gitserver"]
|