golang-base-image/Dockerfile

12 lines
357 B
Docker
Raw Normal View History

2020-12-08 17:08:27 +00:00
ARG IMG_TAG=1
2021-01-04 15:10:48 +00:00
FROM golang:${IMG_TAG} as builder
2021-01-18 16:54:36 +00:00
RUN go get -u -v github.com/go-bindata/go-bindata/... \
&& dir=$(mktemp -d) \
&& git clone https://github.com/go-swagger/go-swagger "$dir" \
&& cd "$dir" \
&& go install ./cmd/swagger
2021-01-04 15:04:31 +00:00
2021-01-04 15:10:48 +00:00
FROM golang:${IMG_TAG}
COPY --from=builder /go/bin/swagger /usr/bin
COPY --from=builder /go/bin/go-bindata /usr/bin