From 4d86c66ccb225d45faa7115ceb967a6b99cfbfd6 Mon Sep 17 00:00:00 2001 From: Tom Avalexing Date: Tue, 3 Oct 2023 17:27:43 +0300 Subject: [PATCH] fix docker dev (#1844) --- infra/dev/postgres/Dockerfile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/infra/dev/postgres/Dockerfile b/infra/dev/postgres/Dockerfile index f36394df55..31a688ad3b 100644 --- a/infra/dev/postgres/Dockerfile +++ b/infra/dev/postgres/Dockerfile @@ -4,7 +4,22 @@ FROM postgres:${PG_MAIN_VERSION} as postgres ARG PG_MAIN_VERSION ARG PG_GRAPHQL_VERSION=1.3.0 -ARG TARGETARCH=arm64 +ARG TARGETARCH + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + TARGETARCH='arm64'; \ + ;; \ + amd64|x86_64) \ + TARGETARCH='amd64'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; RUN apt update && apt install -y curl