19 lines
874 B
Docker
19 lines
874 B
Docker
|
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 /
|
||
|
COPY --from=builder /usr/lib/libjq.* /usr/lib/
|