Skip to content

Commit

Permalink
set arch based on CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Aug 30, 2024
1 parent 6c78eea commit b74a818
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ image_tag="20.04"
endif
# Set arch to linux/amd64 if it's not defined
arch ?= linux/amd64

# Detect the CPU architecture
CPU_ARCH := $(shell uname -m)
# Map the architecture to Docker platform
ifeq ($(CPU_ARCH), arm64)
arch := linux/arm64
else ifeq ($(CPU_ARCH), aarch64)
arch := linux/arm64
endif

buildx=0
cache_from=type=local,src=/tmp/.buildx-cache
cache_to=type=local,dest=/tmp/.buildx-cache
Expand Down

0 comments on commit b74a818

Please sign in to comment.