recipe-sync-server-rs/Dockerfile

25 lines
480 B
Docker
Raw Normal View History

# -]--- builder image
FROM rust:1.93.1-alpine3.21 AS builder
WORKDIR /app
COPY . .
RUN cargo build --target x86_64-unknown-linux-musl --release
# -]--- final image
FROM alpine:3.21
# Create app directory (also cd's us into this dir)
WORKDIR /app
EXPOSE 9696
# Copy the binary compiled in the builder image
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/recipe-sync-server-rs ./
ENTRYPOINT [ "/app/recipe-sync-server-rs" ]
CMD [ "-e", "/app/recipes" ]