forked from loafle/openapi-generator-original
* copy from go-server and add go-gin-server generator * change the templates for the gin * fix warnings of the golint tool * fix the path of script * add samples * delete unnecessary comments (#1048) * make the help message more appropriate (#1048) * fix the link address format (#1048) * minor improvement
15 lines
285 B
Docker
15 lines
285 B
Docker
FROM golang:1.10 AS build
|
|
WORKDIR /go/src
|
|
COPY go ./go
|
|
COPY main.go .
|
|
|
|
ENV CGO_ENABLED=0
|
|
RUN go get -d -v ./...
|
|
|
|
RUN go build -a -installsuffix cgo -o petstoreserver .
|
|
|
|
FROM scratch AS runtime
|
|
COPY --from=build /go/src/petstoreserver ./
|
|
EXPOSE 8080/tcp
|
|
ENTRYPOINT ["./petstoreserver"]
|