helm-import/build/package/Dockerfile

19 lines
895 B
Docker
Raw Permalink Normal View History

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
COPY --from=builder /go/src/git.martyn.berlin/martyn/helm-import/bin/helm-import-linux-x64 /helm-import
COPY --from=builder /usr/lib/libjq.* /usr/lib/