-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (22 loc) · 1.09 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM --platform=linux/amd64 alpine:3.19.1 as download
ARG TARGETPLATFORM
ENV TINI_STATIC_VERSION=0.19.0
ENV PIPING_SERVER_PKG_VERSION=1.12.9-2
RUN apk add --no-cache curl
RUN case $TARGETPLATFORM in\
linux/amd64) pkg_target="linuxstatic-x64";\
tini_static_arch="amd64";;\
linux/arm/v7) pkg_target="linuxstatic-armv7";\
tini_static_arch="armel";;\
linux/arm64) pkg_target="linuxstatic-arm64";\
tini_static_arch="arm64";;\
*) exit 1;;\
esac &&\
curl -L https://github.com/krallin/tini/releases/download/v${TINI_STATIC_VERSION}/tini-static-${tini_static_arch} > /tini-static &&\
chmod +x /tini-static &&\
curl -L https://github.com/nwtgck/piping-server-pkg/releases/download/v${PIPING_SERVER_PKG_VERSION}/piping-server-pkg-${pkg_target}.tar.gz | tar xzf - &&\
cp ./piping-server-pkg-${pkg_target}/piping-server /piping-server
FROM scratch
COPY --from=download /tini-static /tini-static
COPY --from=download /piping-server /piping-server
ENTRYPOINT [ "/tini-static", "--", "/piping-server" ]