logo-generator/Dockerfile
Dorian Zedler 2329b80ed8
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Feat: docker image
2023-03-12 00:04:47 +01:00

13 lines
No EOL
518 B
Docker

FROM rust:1.68-bookworm as build
WORKDIR /build
COPY . .
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
RUN echo $(rustup show | head -n 1 | awk '{print $NF}') > /platform
RUN cargo build --release --target $(cat /platform) --bin logo-generator
RUN mv target/$(cat /platform)/release/logo-generator logo-generator
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y libcairo2-dev && rm -rf /var/lib/apt/lists/*
COPY --from=build /build/logo-generator /logo-generator
EXPOSE 3000
CMD ["/logo-generator"]