2024-08-23 09:27:59 +02:00
|
|
|
FROM docker.io/library/rust:1.80.1-bullseye as builder
|
2024-01-05 11:28:19 +01:00
|
|
|
|
|
|
|
RUN apt update && apt install build-essential cmake -y
|
2024-11-04 17:34:24 +01:00
|
|
|
RUN cargo install sqlx-cli@0.7.3 --locked --no-default-features --features native-tls,postgres --root /app/target/release/
|
2024-01-05 11:28:19 +01:00
|
|
|
|
|
|
|
FROM debian:bullseye-20230320-slim AS runtime
|
|
|
|
WORKDIR /sqlx
|
|
|
|
|
2024-06-11 17:30:21 +02:00
|
|
|
COPY bin /sqlx/bin/
|
|
|
|
COPY migrations /sqlx/migrations/
|
2024-01-05 11:28:19 +01:00
|
|
|
|
|
|
|
COPY --from=builder /app/target/release/bin/sqlx /usr/local/bin
|
|
|
|
|
|
|
|
RUN chmod +x ./bin/migrate
|
|
|
|
|
|
|
|
CMD ["./bin/migrate"]
|