mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
7602629741
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11027 GitOrigin-RevId: 935bd1ad87729507d82033118b1319fb8452b215
52 lines
1.9 KiB
Docker
52 lines
1.9 KiB
Docker
# DATE VERSION: 2024-09-17
|
|
# Modify the above date version (YYYY-MM-DD) if you want to rebuild the image
|
|
|
|
FROM registry.access.redhat.com/ubi9-minimal:9.4-1227.1725849298 as pg_dump_source
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
RUN set -ex; \
|
|
if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
|
rpm -i https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-aarch64/pgdg-redhat-repo-latest.noarch.rpm; \
|
|
else \
|
|
rpm -i https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm; \
|
|
fi; \
|
|
microdnf install -y postgresql16-server
|
|
|
|
FROM registry.access.redhat.com/ubi9-minimal:9.4-1227.1725849298
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
|
|
|
|
RUN set -ex; \
|
|
microdnf install -y shadow-utils; \
|
|
groupadd -g 1001 hasura; \
|
|
useradd -m -u 1001 -g hasura hasura; \
|
|
microdnf remove -y shadow-utils
|
|
|
|
# Install pg_dump
|
|
COPY --from=pg_dump_source /usr/bin/pg_dump /usr/bin/pg_dump
|
|
|
|
# mysql
|
|
# graphql-engine is built on ubuntu, so the binary links to the debian version of pcre so(libpcre.so.3).
|
|
# here, we are creating a symlink to libpcre.so.1. we did this in the centos images as well:
|
|
# https://github.com/hasura/graphql-engine-mono/blob/02dc61f05e06f46c193be3685abbef9c8535edef/packaging/graphql-engine-base/centos.dockerfile#L45
|
|
RUN ln -s /usr/lib64/libpcre.so.1 /usr/lib64/libpcre.so.3
|
|
|
|
RUN set -ex; \
|
|
# deps needed for graphql-engine
|
|
microdnf install -y krb5-libs libpq-13.11-1.el9 numactl-libs; \
|
|
# deps for cli-migrations
|
|
microdnf install -y nc
|
|
|
|
RUN set -ex; \
|
|
curl -fsS https://packages.microsoft.com/config/rhel/9/prod.repo | tee /etc/yum.repos.d/mssql-release.repo; \
|
|
ACCEPT_EULA=Y microdnf install -y msodbcsql18 unixODBC-devel; \
|
|
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
|
# Support the old version of the driver too, where possible.
|
|
# v17 is only supported on amd64.
|
|
ACCEPT_EULA=Y microdnf -y install msodbcsql17; \
|
|
fi; \
|
|
microdnf clean all
|