tools/sqlx/Dockerfile

14 lines
285 B
Docker
Raw Normal View History

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
CMD sqlx migrate run --source /migrations