Skip to content

Commit 93a6f3d

Browse files
committed
feat: docker add linux/arm64 platform support
1 parent 8d7fda9 commit 93a6f3d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ jobs:
8989
if: github.repository == 'casbin/casbin-server' && github.event_name == 'push' && steps.should_push.outputs.push=='true'
9090
with:
9191
target: STANDARD
92-
platforms: linux/amd64
92+
platforms: linux/amd64,linux/arm64
9393
push: true
9494
tags: casbin/casbin-server:${{steps.get-current-tag.outputs.tag }},casbin/casbin-server:latest

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ RUN curl -LjO https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.1
2121
rm v3.17.3.zip
2222

2323
# Go environment variable to enable Go modules
24+
ARG TARGETOS
25+
ARG TARGETARCH
2426
ENV GO111MODULE=on \
2527
CGO_ENABLED=0 \
26-
GOOS=linux \
27-
GOARCH=amd64
28+
GOOS=${TARGETOS} \
29+
GOARCH=${TARGETARCH}
2830

2931
# Download dependencies
3032
RUN go mod download

0 commit comments

Comments
 (0)