Skip to content

Commit e2ed23a

Browse files
authored
feat: docker add linux/arm64 platform support (#123)
1 parent 8d7fda9 commit e2ed23a

File tree

3 files changed

+38
-8
lines changed

3 files changed

+38
-8
lines changed

.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

README.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,39 @@
11
Casbin Server
22
====
33

4-
[![GitHub Actions](https://github.com/casbin/casbin-server/actions/workflows/default.yml/badge.svg)](https://github.com/casbin/casbin-server/actions)
5-
[![Docker](https://img.shields.io/docker/automated/casbin/casbin-server)](https://hub.docker.com/r/casbin/casbin-server/builds/)
6-
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/casbin/casbin-server?label=image%20version)](https://hub.docker.com/r/casbin/casbin-server/tags)
7-
[![Coverage Status](https://coveralls.io/repos/github/casbin/casbin-server/badge.svg?branch=master)](https://coveralls.io/github/casbin/casbin-server?branch=master)
8-
[![Godoc](https://godoc.org/github.com/casbin/casbin-server?status.svg)](https://godoc.org/github.com/casbin/casbin-server)
4+
<p align="center">
5+
<a href="#badge">
6+
<img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg">
7+
</a>
8+
<a href="https://hub.docker.com/r/casbin/casbin-server">
9+
<img alt="docker pull casbin/casbin-server" src="https://img.shields.io/docker/pulls/casbin/casbin-server.svg">
10+
</a>
11+
<a href="https://github.com/casbin/casbin-server/actions/workflows/default.yml">
12+
<img alt="GitHub Workflow Status (branch)" src="https://github.com/casbin/casbin-server/workflows/Build/badge.svg?style=flat-square">
13+
</a>
14+
<a href="https://github.com/casbin/casbin-server/releases/latest">
15+
<img alt="GitHub Release" src="https://img.shields.io/github/v/release/casbin/casbin-server.svg">
16+
</a>
17+
<a href="https://coveralls.io/github/casbin/casbin-server?branch=master">
18+
<img alt="Coverage Status" src="https://coveralls.io/repos/github/casbin/casbin-server/badge.svg?branch=master">
19+
</a>
20+
<a href="https://hub.docker.com/r/casbin/casbin-server">
21+
<img alt="Docker Image Version (latest semver)" src="https://img.shields.io/badge/Docker%20Hub-latest-brightgreen">
22+
</a>
23+
</p>
24+
25+
<p align="center">
26+
<a href="https://goreportcard.com/report/github.com/casbin/casbin-server">
27+
<img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/casbin/casbin-server?style=flat-square">
28+
</a>
29+
<a href="https://github.com/casbin/casbin-server/blob/master/LICENSE">
30+
<img src="https://img.shields.io/github/license/casbin/casbin-server?style=flat-square" alt="license">
31+
</a>
32+
<a href="https://discord.gg/5rPsrAzK7S">
33+
<img alt="Discord" src="https://img.shields.io/discord/1022748306096537660?style=flat-square&logo=discord&label=discord&color=5865F2">
34+
</a>
35+
</p>
36+
937

1038
Casbin Server is the ``Access Control as a Service (ACaaS)`` solution based on [Casbin](https://github.com/casbin/casbin). It provides [gRPC](https://grpc.io/) interface for Casbin authorization.
1139

0 commit comments

Comments
 (0)