2023-12-06 15:08:56 +01:00
|
|
|
FROM rust:alpine as build
|
|
|
|
RUN apk add musl-dev
|
2023-12-06 15:51:50 +01:00
|
|
|
|
|
|
|
ARG VERSION
|
2023-12-06 15:08:56 +01:00
|
|
|
RUN cargo install sqlx-cli \
|
2023-12-06 15:46:02 +01:00
|
|
|
--version $VERSION \
|
2023-12-06 15:08:56 +01:00
|
|
|
--no-default-features \
|
|
|
|
-F postgres,rustls
|
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
COPY --from=build /usr/local/cargo/bin/sqlx /usr/local/bin/sqlx
|
|
|
|
|
2023-12-11 17:55:32 +01:00
|
|
|
CMD sqlx migrate run --source $MIGRATIONS
|