13 lines
518 B
Text
13 lines
518 B
Text
|
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"]
|