Skip to content

Instantly share code, notes, and snippets.

@malikbenkirane
Last active May 2, 2026 08:35
Show Gist options
  • Select an option

  • Save malikbenkirane/bc4ca1737b34531fbd54c0098c9bb3d6 to your computer and use it in GitHub Desktop.

Select an option

Save malikbenkirane/bc4ca1737b34531fbd54c0098c9bb3d6 to your computer and use it in GitHub Desktop.
talos v0.13.0 Apple Silicon

Build Talos Image

Target Architecture: AMD64v1

Requirements

  1. gnused
brew install gnused
PATH=/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH
  1. docker

Step by step

Patch Makefile

Apply attachment Makefile.diff.

Build Imager Image

docker build imager

Build Talos Bare Metal Image

make image-metal
diff --git a/Makefile b/Makefile
index 99ecb0b..b414af3 100644
--- a/Makefile
+++ b/Makefile
@@ -97,7 +97,7 @@ GO_VERSION ?= 1.26
# renovate: datasource=npm depName=markdownlint-cli
MARKDOWNLINTCLI_VERSION ?= 0.48.0
OPERATING_SYSTEM := $(shell uname -s | tr "[:upper:]" "[:lower:]")
-ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
+ARCH := amd64
TALOSCTL_DEFAULT_TARGET := talosctl-$(OPERATING_SYSTEM)
TALOSCTL_EXECUTABLE := $(PWD)/$(ARTIFACTS)/$(TALOSCTL_DEFAULT_TARGET)-$(ARCH)
INTEGRATION_TEST := integration-test
@@ -133,7 +133,7 @@ GO_BUILDTAGS ?= tcell_minimal,grpcnotrace
GO_BUILDTAGS_TALOSCTL ?= grpcnotrace
GO_LDFLAGS ?=
GO_MACHINED_LDFLAGS ?= -X golang.zx2c4.com/wireguard/ipc.socketDirectory=/system/wireguard-sock # see https://github.com/siderolabs/talos/issues/8514
-GOAMD64 ?= v2
+GOAMD64 ?= v1
GOFIPS140 ?= off
WITH_RACE ?= false
@@ -336,7 +336,7 @@ docker-%: ## Builds the specified target defined in the Dockerfile using the doc
@$(MAKE) target-$* TARGET_ARGS="--output type=docker,dest=$(DEST)/$*.tar,name=$(REGISTRY_AND_USERNAME)/$*$(IMAGE_NAME_SUFFIX):$(IMAGE_TAG_OUT) $(TARGET_ARGS)"
registry-%: ## Builds the specified target defined in the Dockerfile using the image/registry output type. The build result will be pushed to the registry if PUSH=true.
- @$(MAKE) target-$* TARGET_ARGS="--output type=image,name=$(REGISTRY_AND_USERNAME)/$*$(IMAGE_NAME_SUFFIX):$(IMAGE_TAG_OUT),rewrite-timestamp=true $(TARGET_ARGS)"
+ @$(MAKE) target-$* TARGET_ARGS="--output type=image,name=$(REGISTRY_AND_USERNAME)/$*$(IMAGE_NAME_SUFFIX):$(IMAGE_TAG_OUT) $(TARGET_ARGS)"
hack-test-%: ## Runs the specified script in ./hack/test with well known environment variables.
@./hack/test/$*.sh
@@ -428,7 +428,6 @@ sbom:
@$(MAKE) local-sbom DEST=$(ARTIFACTS)
image-%: ## Builds the specified image. Valid options are aws, azure, digital-ocean, gcp, and vmware etc (e.g. image-aws)
- @docker pull $(REGISTRY_AND_USERNAME)/imager$(IMAGE_NAME_SUFFIX):$(IMAGE_TAG_IN)
@for platform in $(subst $(,),$(space),$(PLATFORM)); do \
arch=$$(basename "$${platform}") && \
docker run --rm -t \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment