mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
c3afa0fdd7
This installs the ODBC Driver 18 for SQL Server in all our shipped Docker images, and update our tests and documentation accordingly. This version supports arm64, and therefore can run natively (or via Docker) on macOS on aarch64. `msodbcsql17` is still installed in production-targeted Docker images so that users do not _have_ to migrate to the new driver. Nix expressions are packaged for the new driver, as it is not yet available in nixpkgs. In this version, [the default encryption setting was changed from "no" to "yes"](https://techcommunity.microsoft.com/t5/sql-server-blog/odbc-driver-18-0-for-sql-server-released/ba-p/3169228). In addition, "mandatory" and "optional" were added as synonyms for "yes" and "no" respectively. I have therefore modified all connection strings in tests to specify `Encrypt=optional` (and changed some from `Encrypt=no`). I chose "optional" rather than "no" because I feel it's more honest; these connection strings will work with or without an encrypted connection. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6241 GitOrigin-RevId: 959f88dd1f271ef06a3616bc46b358f364f6cdfd
48 lines
1.8 KiB
Docker
48 lines
1.8 KiB
Docker
# DATE VERSION: 2022-10-17
|
|
# Modify the above date version (YYYY-MM-DD) if you want to rebuild the image
|
|
FROM ubuntu:focal-20220922
|
|
|
|
### NOTE! Shared libraries here need to be kept in sync with `server-builder.dockerfile`!
|
|
|
|
# TARGETPLATFORM is automatically set up by docker buildx based on the platform we are targetting for
|
|
ARG TARGETPLATFORM
|
|
|
|
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
|
|
|
|
RUN set -ex; \
|
|
groupadd -g 1001 hasura; \
|
|
useradd -m -u 1001 -g hasura hasura
|
|
|
|
RUN set -ex; \
|
|
apt-get update; \
|
|
apt-get install -y apt-transport-https curl gnupg2; \
|
|
apt-get update; \
|
|
apt-get install -y ca-certificates libkrb5-3 libpq5 libssl1.1 libnuma1 unixodbc-dev libmariadb-dev-compat mariadb-client
|
|
|
|
RUN set -ex; \
|
|
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -; \
|
|
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list; \
|
|
apt-get update; \
|
|
ACCEPT_EULA=Y apt-get install -y msodbcsql18; \
|
|
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
|
# Support the old version of the driver too, where possible.
|
|
# v17 is only supported on amd64.
|
|
ACCEPT_EULA=Y apt-get -y install msodbcsql17; \
|
|
fi
|
|
|
|
# Install pg_dump
|
|
RUN set -ex; \
|
|
curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -; \
|
|
echo 'deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main' > /etc/apt/sources.list.d/pgdg.list; \
|
|
apt-get -y update; \
|
|
apt-get install -y postgresql-client-15; \
|
|
# delete all pg tools except pg_dump to keep the image minimal
|
|
find /usr/bin -name 'pg*' -not -path '/usr/bin/pg_dump' -delete
|
|
|
|
# Cleanup unwanted files and packages
|
|
RUN set -ex; \
|
|
apt-get -y remove curl gnupg2; \
|
|
apt-get -y auto-remove; \
|
|
apt-get -y clean; \
|
|
rm -rf /var/lib/apt/lists/* /usr/share/doc/ /usr/share/man/ /usr/share/locale/
|