mirror of
https://codeberg.org/gigirassy/image-proxy/
synced 2026-08-30 15:37:41 +00:00
27 lines
666 B
Docker
27 lines
666 B
Docker
FROM 11notes/alpine:stable as builder
|
|
|
|
USER root
|
|
|
|
RUN apk update && apk add ca-certificates musl-dev build-base openssl-dev curl
|
|
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
WORKDIR /app
|
|
COPY Cargo.toml .
|
|
COPY src ./src
|
|
|
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
|
|
|
RUN rustup target add x86_64-unknown-linux-musl
|
|
|
|
RUN RUSTFLAGS="-Ctarget-feature=+crt-static" cargo build --release --target x86_64-unknown-linux-musl
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /app/target/release/image-proxy /usr/local/bin/image-proxy
|
|
|
|
COPY --from=builder /etc/ssl /etc/ssl
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["image-proxy"] |