Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/FoxxMD/docker-proxy-filter. Filter the contents of Docker API responses
Something went wrong. Try again.
954 B · 31 lines
Dockerfile
at main
12345678910111213141516171819202122232425262728293031FROM rust:1.90-bookworm as Builder
WORKDIR /app
RUN cargo init
COPY Cargo.lock Cargo.toml ./
# build dummy project with dependencies to get them compiled and cachedRUN cargo build --release --target $(rustc --print host-tuple)
# copy full app codeCOPY src/ src/# updated modified timestamp so build runs againRUN touch src/main.rs
# build full app to host arch and copy to generic locationRUN export ARCH=$(rustc --print host-tuple); \ cargo build --release --target $ARCH \ && mkdir build \ && cp target/$ARCH/release/docker-proxy-filter build/docker-proxy-filter
FROM debian:bookworm-slim
ENV RUST_LOG=info,docker_proxy_filter=debug
# need ssl for web serverRUN apt-get update && apt-get upgrade -y && apt-get install openssl -y && apt clean && rm -rf /var/lib/apt/lists/*# copy built app from generic locationCOPY --from=builder /app/build/docker-proxy-filter /usr/local/bin/docker-proxy-filterCMD ["docker-proxy-filter"]