@@ -8,15 +8,16 @@ RUN git clone https://github.com/google/jsonnet && \
88 cp jsonnet/jsonnetfmt /usr/bin
99
1010# Build jb
11- FROM golang:1.14.1-alpine3.11 AS jb-builder
12- RUN apk add --no-cache git make
13- RUN git clone https://github.com/jsonnet-bundler/jsonnet-bundler /jsonnet-bundler && \
14- cd /jsonnet-bundler && \
15- git checkout v0.2.0 && \
16- make install
11+ FROM alpine:3.11 AS jb-builder
12+ ARG JSONNET_BUNDLER_VERSION=0.4.0
13+ ARG JSONNET_BUNDLER_CHECKSUM="433edab5554a88a0371e11e93080408b225d41c31decf321c02b50d2e44993ce /usr/bin/jb"
14+ RUN apk add --no-cache curl
15+ RUN curl -fSL -o "/usr/bin/jb" "https://github.com/jsonnet-bundler/jsonnet-bundler/releases/download/v${JSONNET_BUNDLER_VERSION}/jb-linux-amd64"
16+ RUN echo "${JSONNET_BUNDLER_CHECKSUM}" | sha256sum -c || (printf "wanted: %s\n got: %s\n " "${JSONNET_BUNDLER_CHECKSUM}" "$(sha256sum /usr/bin/jb)" ; exit 1)
17+ RUN chmod +x /usr/bin/jb
1718
1819# Build tanka
19- FROM golang:1.14.1-alpine3. 11 as tk-builder
20+ FROM alpine:3. 11 AS tk-builder
2021ARG TANKA_VERSION=0.11.1
2122ARG TANKA_CHECKSUM="3b253ca7d7bf01189604c10a8f7cead20a553ddc04c813f0f836d80338cfad71 /usr/bin/tk"
2223RUN apk add --no-cache curl
@@ -28,5 +29,5 @@ FROM alpine:3.11
2829RUN apk add --no-cache git make libgcc libstdc++ zip
2930COPY --from=jsonnet-builder /usr/bin/jsonnetfmt /usr/bin
3031COPY --from=jsonnet-builder /usr/bin/jsonnet /usr/bin
31- COPY --from=jb-builder /go /bin/jb /usr/bin
32+ COPY --from=jb-builder /usr /bin/jb /usr/bin
3233COPY --from=tk-builder /usr/bin/tk /usr/bin
0 commit comments