2020-04-14 01:19:00 +00:00
|
|
|
FROM golang:1.14 as builder
|
2018-04-01 09:48:06 +00:00
|
|
|
|
|
|
|
WORKDIR /go/src/mikefarah/yq
|
|
|
|
|
2018-06-27 02:05:52 +00:00
|
|
|
# cache devtools
|
|
|
|
COPY ./scripts/devtools.sh /go/src/mikefarah/yq/scripts/devtools.sh
|
|
|
|
RUN ./scripts/devtools.sh
|
|
|
|
|
2018-04-01 09:48:06 +00:00
|
|
|
COPY . /go/src/mikefarah/yq
|
|
|
|
|
2018-04-02 23:45:30 +00:00
|
|
|
RUN CGO_ENABLED=0 make local build
|
2018-04-01 09:48:06 +00:00
|
|
|
|
|
|
|
# Choose alpine as a base image to make this useful for CI, as many
|
|
|
|
# CI tools expect an interactive shell inside the container
|
2018-11-18 15:55:24 +00:00
|
|
|
FROM alpine:3.8 as production
|
2018-04-01 09:48:06 +00:00
|
|
|
|
|
|
|
COPY --from=builder /go/src/mikefarah/yq/yq /usr/bin/yq
|
|
|
|
RUN chmod +x /usr/bin/yq
|
|
|
|
|
2018-10-25 06:49:46 +00:00
|
|
|
ARG VERSION=none
|
|
|
|
LABEL version=${VERSION}
|
|
|
|
|
2018-04-01 09:48:06 +00:00
|
|
|
WORKDIR /workdir
|