Skip to content

Commit 171e93d

Browse files
dstengleclaude
andcommitted
Add ARM (arm64) support for multi-arch Docker image builds
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5766f33 commit 171e93d

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
FROM mcr.microsoft.com/devcontainers/python:3-3.14-trixie
2-
# Install
2+
# Install
33
RUN apt-get update && apt-get install -y git vim curl tmux wget
44
RUN pip install uv
5-
RUN cd /tmp && \
6-
curl -LO https://github.com/specstoryai/getspecstory/releases/latest/download/SpecStoryCLI_Linux_x86_64.tar.gz && \
7-
tar -xzf SpecStoryCLI_Linux_x86_64.tar.gz && \
8-
mv specstory /usr/local/bin/ && chmod +x /usr/local/bin/specstory
5+
RUN ARCH=$(uname -m) && \
6+
if [ "$ARCH" = "aarch64" ]; then SPEC_ARCH="Linux_arm64"; else SPEC_ARCH="Linux_x86_64"; fi && \
7+
cd /tmp && \
8+
curl -LO "https://github.com/specstoryai/getspecstory/releases/latest/download/SpecStoryCLI_${SPEC_ARCH}.tar.gz" && \
9+
tar -xzf "SpecStoryCLI_${SPEC_ARCH}.tar.gz" && \
10+
mv specstory /usr/local/bin/ && chmod +x /usr/local/bin/specstory
911
RUN curl -fsSL https://claude.ai/install.sh | sudo -u vscode bash
10-
RUN curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash && ln -s /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/x86_64-linux-gnu/libicui18n.so.74
11-
RUN cd /tmp && curl -L -o temporal.tar.gz "https://temporal.download/cli/archive/latest?platform=linux&arch=amd64" && \
12-
tar -xzf temporal.tar.gz && mv temporal /usr/local/bin/ && chmod +x /usr/local/bin/temporal
12+
RUN ARCH=$(uname -m) && \
13+
if [ "$ARCH" = "aarch64" ]; then LIB_DIR="aarch64-linux-gnu"; else LIB_DIR="x86_64-linux-gnu"; fi && \
14+
curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash && \
15+
ln -s /usr/lib/${LIB_DIR}/libicui18n.so /usr/lib/${LIB_DIR}/libicui18n.so.74
16+
RUN ARCH=$(uname -m) && \
17+
if [ "$ARCH" = "aarch64" ]; then TEMPORAL_ARCH="arm64"; else TEMPORAL_ARCH="amd64"; fi && \
18+
cd /tmp && curl -L -o temporal.tar.gz "https://temporal.download/cli/archive/latest?platform=linux&arch=${TEMPORAL_ARCH}" && \
19+
tar -xzf temporal.tar.gz && mv temporal /usr/local/bin/ && chmod +x /usr/local/bin/temporal

.github/workflows/build-and-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
- name: Checkout repository
2424
uses: actions/checkout@v4
2525

26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
2629
- name: Set up Docker Buildx
2730
uses: docker/setup-buildx-action@v3
2831

@@ -52,4 +55,4 @@ jobs:
5255
5356
- name: Build and push container image
5457
run: |
55-
devcontainer build --workspace-folder . --image-name ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} --push
58+
devcontainer build --workspace-folder . --image-name ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} --platform linux/amd64,linux/arm64 --push

0 commit comments

Comments
 (0)