logo-generator/Dockerfile

13 lines
518 B
Text
Raw Permalink Normal View History

2024-03-18 12:26:53 +00:00
FROM rust:1.76-bookworm as build
2023-03-11 23:04:47 +00:00
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"]