Skip to content

Instantly share code, notes, and snippets.

@pedromfedricci
Created August 11, 2021 02:34
Show Gist options
  • Save pedromfedricci/61eebc26a5bc6ea900c06327e1520e77 to your computer and use it in GitHub Desktop.
Save pedromfedricci/61eebc26a5bc6ea900c06327e1520e77 to your computer and use it in GitHub Desktop.
PostgresSQL enabled sqlx-cli
ARG RUST_BASE_IMAGE=rust:slim
FROM ${RUST_BASE_IMAGE} AS base
ARG SQLX_CLI_VERSION=0.5.5
RUN apt-get update \
&& \
apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config \
&& \
cargo install sqlx-cli \
--version=${SQLX_CLI_VERSION} \
--no-default-features \
--features postgres \
&& \
apt-get remove -y --auto-remove \
&& \
rm -rf /var/lib/apt/lists/*
ENTRYPOINT [ "sqlx" ]
CMD [ "help" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment