Skip to content

Commit d2269c9

Browse files
committed
Update multi-arch Dockerbuild
Signed-off-by: yutao04 <[email protected]>
1 parent 40bfed6 commit d2269c9

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/docker-build.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- 'v*'
1111

1212
jobs:
13-
build:
13+
buildx:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
@@ -44,5 +44,7 @@ jobs:
4444
with:
4545
context: .
4646
file: ./hango-api-plane-server/Dockerfile
47+
# 所需要的体系结构,可以在 Available platforms 步骤中获取所有的可用架构
48+
platforms: linux/amd64,linux/arm64/v8
4749
push: ${{ github.ref_type == 'tag' }}
4850
tags: ${{ steps.meta.outputs.tags }}

hango-api-plane-server/Dockerfile

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM hangoio/tomcat-8.5:v1.1
1+
FROM tomcat:8.5-jdk8
22

33
ENV TZ=Asia/Shanghai LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@@ -7,8 +7,10 @@ COPY hango-api-plane-server/setenv.sh $CATALINA_HOME/bin/
77
RUN rm -rf webapps/*
88
COPY hango-api-plane-server/target/*.war webapps/
99
RUN cd /usr/local/tomcat/webapps && \
10-
mv *.war ROOT.war && \
11-
unzip ROOT.war -d ./ROOT && \
12-
rm -f ROOT.war
10+
mkdir ROOT && \
11+
mv *.war ROOT/ROOT.war && \
12+
cd ROOT && \
13+
jar -xvf ROOT.war && \
14+
rm -rf *.war
1315

1416
ENTRYPOINT ["catalina.sh", "run"]

0 commit comments

Comments
 (0)