File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,16 +2,23 @@ FROM docker.io/library/golang:alpine as builder
22
33ARG PB_BUILD_VERSION
44
5+ ARG CLI_VERSION=0.0.6
6+ ARG CLI_PLATFORM=linux_amd64
7+
58WORKDIR /build
69
710COPY . .
811
912RUN set -ex \
10- && apk add --no-cache build-base \
13+ && apk add --no-cache build-base ca-certificates curl \
1114 && go mod download \
1215 && go mod verify \
1316 && PB_BUILD_VERSION="$PB_BUILD_VERSION" make build \
14- && chmod +x /build/out/pushbits
17+ && chmod +x /build/out/pushbits \
18+ && curl -q -s -S -L -o /tmp/pbcli_${CLI_VERSION}.tar.gz https://github.com/pushbits/cli/releases/download/v${CLI_VERSION}/pbcli_${CLI_VERSION}_${CLI_PLATFORM}.tar.gz \
19+ && tar -C /usr/local/bin -xvf /tmp/pbcli_${CLI_VERSION}.tar.gz pbcli \
20+ && chown root:root /usr/local/bin/pbcli \
21+ && chmod +x /usr/local/bin/pbcli
1522
1623FROM docker.io/library/alpine
1724
@@ -25,6 +32,7 @@ WORKDIR /app
2532
2633COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
2734COPY --from=builder /build/out/pushbits ./run
35+ COPY --from=builder /usr/local/bin/pbcli /usr/local/bin/pbcli
2836
2937RUN set -ex \
3038 && apk add --no-cache ca-certificates curl \
You can’t perform that action at this time.
0 commit comments