arm64 docker image builds
Some checks failed
Build and Push Docker Image to GHCR / build-and-push (push) Has been cancelled

This commit is contained in:
Zoe
2025-09-30 20:20:25 -05:00
parent 01a147d2d3
commit b460cae4e6
2 changed files with 27 additions and 5 deletions

View File

@@ -27,6 +27,13 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ env.OCI_TOKEN }} password: ${{ env.OCI_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Extract Docker metadata - name: Extract Docker metadata
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
@@ -40,3 +47,4 @@ jobs:
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64

View File

@@ -3,21 +3,35 @@ FROM golang:1.25 AS builder
# build dependencies # build dependencies
RUN apt update && apt install -y upx RUN apt update && apt install -y upx
RUN curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/download/v4.1.13/tailwindcss-linux-x64 ARG TARGETARCH
RUN chmod +x tailwindcss-linux-x64 RUN set -eux; \
RUN mv tailwindcss-linux-x64 /usr/local/bin/tailwindcss echo "Building for architecture: ${TARGETARCH}"; \
case "${TARGETARCH}" in \
"amd64") \
arch_suffix='x64' ;; \
"arm64") \
arch_suffix='arm64' ;; \
*) \
echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
esac; \
curl -sLO "https://github.com/tailwindlabs/tailwindcss/releases/download/v4.1.13/tailwindcss-linux-${arch_suffix}"; \
mv "tailwindcss-linux-${arch_suffix}" /usr/local/bin/tailwindcss; \
chmod +x /usr/local/bin/tailwindcss;
RUN file /usr/local/bin/tailwindcss
RUN go install github.com/juls0730/zqdgr@latest RUN go install github.com/juls0730/zqdgr@latest
WORKDIR /app WORKDIR /app
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ARG TARGETARCH
ENV CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH}
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download RUN go mod download
COPY . . COPY . .
RUN zqdgr build RUN zqdgr build
RUN upx passport RUN upx passport