docker: add a debian dockerfile that builds from source
Diff
docker/devel/Dockerfile.debian.builder | 45 +++++++++++++++++++++++++++++++++++-
1 file changed, 45 insertions(+)
@@ -0,0 +1,45 @@
FROM rust:1.71-slim AS builder
RUN rustup component add rustfmt
COPY ../../. /sws-source
WORKDIR /sws-source
RUN cargo build --release
FROM debian:12.4-slim
ENV SERVER_VERSION=devel
LABEL version="${SERVER_VERSION}" \
description="A cross-platform, high-performance and asynchronous web server for static files-serving." \
maintainer="Jose Quintana <joseluisq.net>"
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ca-certificates \
tzdata \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& true
COPY --from=builder /sws-source/target/release/static-web-server /usr/local/bin/
COPY ./docker/debian/entrypoint.sh /
COPY ./docker/public /public
EXPOSE 80
STOPSIGNAL SIGQUIT
ENTRYPOINT ["/entrypoint.sh"]
CMD ["static-web-server"]
LABEL org.opencontainers.image.vendor="Jose Quintana" \
org.opencontainers.image.url="https://github.com/static-web-server/static-web-server" \
org.opencontainers.image.title="Static Web Server" \
org.opencontainers.image.description="A cross-platform, high-performance and asynchronous web server for static files-serving." \
org.opencontainers.image.version="${SERVER_VERSION}" \
org.opencontainers.image.documentation="https://github.com/static-web-server/static-web-server"