mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 09:51:59 +03:00
fac5e0b2c3
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3597 GitOrigin-RevId: f1fded72524f28f41433eea6819276932ee0b5cb
29 lines
1.0 KiB
Docker
29 lines
1.0 KiB
Docker
FROM ubuntu:20.04
|
|
|
|
# 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 groupadd -g 1001 hasura && useradd -m -u 1001 -g hasura hasura
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y gnupg2 curl apt-transport-https \
|
|
&& apt-get update \
|
|
&& apt-get install -y ca-certificates libkrb5-3 libpq5 libnuma1 unixodbc-dev libmariadb-dev-compat mariadb-client-10.3
|
|
|
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ] ; then \
|
|
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 msodbcsql17 ; \
|
|
fi
|
|
|
|
# Cleanup unwanted files and packages
|
|
RUN apt-get -y remove curl gnupg2 \
|
|
&& apt-get -y auto-remove \
|
|
&& apt-get -y clean \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& rm -rf /usr/share/doc/ \
|
|
&& rm -rf /usr/share/man/ \
|
|
&& rm -rf /usr/share/locale/ |