2020-11-15 22:46:00 +00:00
|
|
|
FROM golang:1.14.12-alpine3.12 AS libjq
|
|
|
|
RUN apk --no-cache add curl ca-certificates alpine-sdk && \
|
|
|
|
cd /tmp ; curl -L -fsS https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz | tar -xz && \
|
|
|
|
cd jq-1.5 && \
|
|
|
|
./configure --disable-maintainer-mode --prefix=/usr && \
|
|
|
|
make install-libLTLIBRARIES install-includeHEADERS
|
|
|
|
|
|
|
|
FROM libjq AS builder
|
|
|
|
RUN update-ca-certificates
|
|
|
|
COPY go.mod /go/src/git.martyn.berlin/martyn/helm-import/
|
|
|
|
COPY cmd/ /go/src/git.martyn.berlin/martyn/helm-import/cmd/
|
|
|
|
COPY internal/ /go/src/git.martyn.berlin/martyn/helm-import/internal/
|
|
|
|
COPY Makefile /go/src/git.martyn.berlin/martyn/helm-import/
|
|
|
|
RUN cd /go/src/git.martyn.berlin/martyn/helm-import/; make deps && make dist
|
|
|
|
|
|
|
|
FROM alpine:3.12
|
2020-11-16 11:04:12 +00:00
|
|
|
COPY --from=builder /go/src/git.martyn.berlin/martyn/helm-import/bin/helm-import-linux-x64 /helm-import
|
2020-11-15 22:46:00 +00:00
|
|
|
COPY --from=builder /usr/lib/libjq.* /usr/lib/
|