From eea4a52b30249415ca9e638c357be1e1b1bab853 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Thu, 23 May 2024 11:05:04 +0530 Subject: [PATCH] fix: base aio dockerfile --- .github/workflows/build-aio-base.yml | 2 +- Dockerfile.base | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-aio-base.yml b/.github/workflows/build-aio-base.yml index ceaf4beeaf7..f98c633332b 100644 --- a/.github/workflows/build-aio-base.yml +++ b/.github/workflows/build-aio-base.yml @@ -84,7 +84,7 @@ jobs: version: ${{ env.BUILDX_VERSION }} endpoint: ${{ env.BUILDX_ENDPOINT }} - - name: Build and Push Plane-Proxy to Docker Hub + - name: Build and Push to Docker Hub uses: docker/build-push-action@v5.1.0 with: context: ./no-use diff --git a/Dockerfile.base b/Dockerfile.base index 623883c7333..6748fb9dd58 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM --platform=$BUILDPLATFORM ubuntu:22.04 # Set environment variables for non-interactive installation ENV DEBIAN_FRONTEND=noninteractive @@ -21,6 +21,17 @@ RUN apt-get update && apt-get install -y postgresql postgresql-contrib RUN apt-get update && apt-get install -y redis-server # Install MinIO + +ARG TARGETPLATFORM +RUN if [ "$TARGETPLATFORM" = "amd64" ]; then \ + wget https://dl.min.io/server/minio/release/linux-amd64/minio -O /usr/local/bin/minio; \ + elif [ "$TARGETPLATFORM" = "arm64" ]; then \ + wget https://dl.min.io/server/minio/release/linux-arm64/minio -O /usr/local/bin/minio; \ + else \ + echo "Unsupported architecture: $TARGETPLATFORM"; exit 1; \ + fi && \ + chmod +x /usr/local/bin/minio + RUN wget https://dl.min.io/server/minio/release/linux-amd64/minio -O /usr/local/bin/minio && \ chmod +x /usr/local/bin/minio