golang-base-image/Dockerfile
Jay 434ec873dd
All checks were successful
continuous-integration/drone/push Build is passing
change swagger build
2021-01-19 00:54:36 +08:00

12 lines
357 B
Docker

ARG IMG_TAG=1
FROM golang:${IMG_TAG} as builder
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
FROM golang:${IMG_TAG}
COPY --from=builder /go/bin/swagger /usr/bin
COPY --from=builder /go/bin/go-bindata /usr/bin