0.36.12: docker fixes
This commit is contained in:
1 parent
76f42b5864
commit
f8fc228af1
5 files changed
+50
-26
No files matched your search
+30
-7
@@ -1,26 +1,49 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM rust:1.99-trixie AS build
|
||||
|
||||
FROM rust:1.99.1-trixie AS build
|
||||
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
|
||||
RUN if [ ! -f Cargo.lock ]; then cargo generate-lockfile; fi \
|
||||
&& cargo build --locked --release
|
||||
|
||||
|
||||
FROM debian:trixie-slim AS runtime
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates python3 python3-venv python3-pip openssl certbot \
|
||||
python3-certbot-dns-cloudflare python3-certbot-dns-ovh python3-certbot-dns-rfc2136 \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
python3 \
|
||||
python3-venv \
|
||||
python3-pip \
|
||||
openssl \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& groupadd --system --gid 10001 rustproxy \
|
||||
&& useradd --system --uid 10001 --gid rustproxy --home /var/lib/rustproxy --shell /usr/sbin/nologin rustproxy \
|
||||
&& useradd \
|
||||
--system \
|
||||
--uid 10001 \
|
||||
--gid rustproxy \
|
||||
--home /var/lib/rustproxy \
|
||||
--shell /usr/sbin/nologin \
|
||||
rustproxy \
|
||||
&& install -d -o rustproxy -g rustproxy -m 0700 /var/lib/rustproxy \
|
||||
&& install -d -o rustproxy -g rustproxy -m 0750 /var/log/rustproxy
|
||||
|
||||
COPY --from=build /build/target/release/rust-proxy /usr/local/bin/rust-proxy
|
||||
|
||||
USER rustproxy:rustproxy
|
||||
ENV RUST_PROXY_DATA_DIR=/var/lib/rustproxy \
|
||||
|
||||
ENV RUST_LOG=rust_proxy=info,warn \
|
||||
RUST_PROXY_DATA_DIR=/var/lib/rustproxy \
|
||||
RUST_PROXY_ADMIN_LISTEN=0.0.0.0:9090 \
|
||||
RUST_PROXY_PROXY_LISTEN=0.0.0.0:8080 \
|
||||
RUST_PROXY_ADMIN_LISTEN=127.0.0.1:9090 \
|
||||
RUST_PROXY_TLS_LISTEN=0.0.0.0:8443 \
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
VOLUME ["/var/lib/rustproxy"]
|
||||
|
||||
EXPOSE 8080 8443 9090
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/rust-proxy"]
|
||||
CMD ["serve"]
|
||||
CMD ["serve", "--allow-remote-admin"]
|
||||
Reference in new issue
Block a user