diff --git a/Containerfile b/Containerfile index ecbc73e37..7c8c26f4a 100644 --- a/Containerfile +++ b/Containerfile @@ -55,7 +55,6 @@ LABEL maintainer="Mihai Criveti" \ description="MCP Gateway: An enterprise-ready Model Context Protocol Gateway" ARG PYTHON_VERSION=3.12 -ARG TARGETPLATFORM ARG GRPC_PYTHON_BUILD_SYSTEM_OPENSSL='False' # Install Python and build dependencies @@ -73,7 +72,7 @@ WORKDIR /app # s390x architecture does not support BoringSSL when building wheel grpcio. # Force Python whl to use OpenSSL. # ---------------------------------------------------------------------------- -RUN if [ "$TARGETPLATFORM" = "linux/s390x" ]; then \ +RUN if [ `uname -m` = "s390x" ]; then \ echo "Building for s390x."; \ echo "export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL='True'" > /etc/profile.d/use-openssl.sh; \ else \ diff --git a/Containerfile.lite b/Containerfile.lite index 9e2e4d7aa..fd5ec6c3b 100644 --- a/Containerfile.lite +++ b/Containerfile.lite @@ -76,7 +76,6 @@ SHELL ["/bin/bash", "-euo", "pipefail", "-c"] ARG PYTHON_VERSION ARG ROOTFS_PATH -ARG TARGETPLATFORM=linux/amd64 ARG GRPC_PYTHON_BUILD_SYSTEM_OPENSSL='False' # ---------------------------------------------------------------------------- @@ -102,7 +101,7 @@ WORKDIR /app # s390x architecture does not support BoringSSL when building wheel grpcio. # Force Python whl to use OpenSSL. # ---------------------------------------------------------------------------- -RUN if [ "$TARGETPLATFORM" = "linux/s390x" ]; then \ +RUN if [ `uname -m` = "s390x" ]; then \ echo "Building for s390x."; \ echo "export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL='True'" > /etc/profile.d/use-openssl.sh; \ else \ diff --git a/Makefile b/Makefile index 2fba48aeb..f6b279601 100644 --- a/Makefile +++ b/Makefile @@ -2098,7 +2098,7 @@ endif # ============================================================================= # Auto-detect container runtime if not specified - DEFAULT TO DOCKER -CONTAINER_RUNTIME = $(shell command -v docker >/dev/null 2>&1 && echo docker || echo podman) +CONTAINER_RUNTIME ?= $(shell command -v docker >/dev/null 2>&1 && echo docker || echo podman) # Alternative: Always default to docker unless explicitly overridden # CONTAINER_RUNTIME ?= docker