recipe-sync-server-rs/Dockerfile

25 lines
443 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
WORKDIR /app
# Expose the 8000 port for HTTP traffic
EXPOSE 9696
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" ]