chore(docker): support multiple platform
fix https://github.com/appleboy/gorush/issues/720
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
FROM alpine:3.15.4@sha256:a777c9c66ba177ccfea23f2a216ff6721e78a662cd17019488c417135299cd89
|
||||
FROM alpine:3.17
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
|
||||
org.label-schema.name="Gorush" \
|
||||
@@ -6,9 +9,9 @@ LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
RUN apk add --no-cache ca-certificates mailcap && \
|
||||
echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
COPY release/linux/arm/gorush /bin/
|
||||
COPY release/${TARGETOS}/${TARGETARCH}/gorush /bin/
|
||||
|
||||
EXPOSE 8088 9000
|
||||
HEALTHCHECK --start-period=1s --interval=10s --timeout=5s \
|
||||
@@ -1,17 +0,0 @@
|
||||
FROM alpine:3.15.4@sha256:a777c9c66ba177ccfea23f2a216ff6721e78a662cd17019488c417135299cd89
|
||||
|
||||
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
|
||||
org.label-schema.name="Gorush" \
|
||||
org.label-schema.vendor="Bo-Yi Wu" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
RUN apk add --no-cache ca-certificates mailcap && \
|
||||
echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
||||
|
||||
COPY release/linux/amd64/gorush /bin/
|
||||
|
||||
EXPOSE 8088 9000
|
||||
HEALTHCHECK --start-period=1s --interval=10s --timeout=5s \
|
||||
CMD ["/bin/gorush", "--ping"]
|
||||
|
||||
ENTRYPOINT ["/bin/gorush"]
|
||||
@@ -1,17 +0,0 @@
|
||||
FROM alpine:3.15.4@sha256:a777c9c66ba177ccfea23f2a216ff6721e78a662cd17019488c417135299cd89
|
||||
|
||||
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
|
||||
org.label-schema.name="Gorush" \
|
||||
org.label-schema.vendor="Bo-Yi Wu" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
RUN apk add --no-cache ca-certificates mailcap && \
|
||||
echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
||||
|
||||
COPY release/linux/arm64/gorush /bin/
|
||||
|
||||
EXPOSE 8088 9000
|
||||
HEALTHCHECK --start-period=1s --interval=10s --timeout=5s \
|
||||
CMD ["/bin/gorush", "--ping"]
|
||||
|
||||
ENTRYPOINT ["/bin/gorush"]
|
||||
@@ -1,14 +0,0 @@
|
||||
FROM mcr.microsoft.com/windows/nanoserver:1809-amd64
|
||||
|
||||
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
|
||||
org.label-schema.name="Gorush" \
|
||||
org.label-schema.vendor="Bo-Yi Wu" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
COPY release/gorush.exe C:/bin/gorush.exe
|
||||
|
||||
EXPOSE 8088 9000
|
||||
HEALTHCHECK --start-period=1s --interval=10s --timeout=5s \
|
||||
CMD ["\\gorush.exe", "--ping"]
|
||||
|
||||
ENTRYPOINT [ "C:\\bin\\gorush.exe" ]
|
||||
@@ -1,25 +0,0 @@
|
||||
image: appleboy/gorush:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
-
|
||||
image: appleboy/gorush:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
-
|
||||
image: appleboy/gorush:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
-
|
||||
image: appleboy/gorush:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
||||
Reference in New Issue
Block a user