tools/sqlx/Dockerfile
Adrian Wannenmacher 928c8abe79
All checks were successful
Publish SQLx container / publish (push) Successful in 20s
sqlx: add default source to image again
2023-12-12 00:58:50 +01:00

15 lines
312 B
Docker

FROM rust:alpine as build
RUN apk add musl-dev
ARG VERSION
RUN cargo install sqlx-cli \
--version $VERSION \
--no-default-features \
-F postgres,rustls
FROM alpine
COPY --from=build /usr/local/cargo/bin/sqlx /usr/local/bin/sqlx
ENV MIGRATIONS=/migrations
CMD sqlx migrate run --source $MIGRATIONS