add sqlx Dockerfile

This commit is contained in:
Adrian Wannenmacher 2023-12-06 15:08:56 +01:00
parent bec7dec05e
commit 7754a6c08f
Signed by: tfld
GPG Key ID: 19D986ECB1E492D5
1 changed files with 12 additions and 0 deletions

12
sqlx/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM rust:alpine as build
RUN apk add musl-dev
RUN cargo install sqlx-cli \
--version 0.7.3 \
--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
VOLUME /migrations