16 lines
329 B
Docker
16 lines
329 B
Docker
FROM rust:latest AS builder
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN cargo build --release
|
|
|
|
FROM debian:bookworm-slim
|
|
WORKDIR /app
|
|
COPY --from=builder /app/target/release/hotel-api-rs /usr/local/bin/hotel-api-rs
|
|
|
|
# Create the directory where DB will be stored
|
|
RUN mkdir -p /db
|
|
|
|
# Expose API port
|
|
EXPOSE 8080
|
|
|
|
CMD ["/usr/local/bin/hotel-api-rs"] |