File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
modules/swagger-codegen/src/main
java/io/swagger/codegen/languages Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ public void processOpts() {
100
100
* it will be processed by the template engine. Otherwise, it will be copied
101
101
*/
102
102
supportingFiles .add (new SupportingFile ("swagger.mustache" , "api" , "swagger.yaml" ));
103
+ supportingFiles .add (new SupportingFile ("Dockerfile" , "" , "Dockerfile" ));
103
104
supportingFiles .add (new SupportingFile ("main.mustache" , "" , "main.go" ));
104
105
supportingFiles .add (new SupportingFile ("routers.mustache" , apiPath , "routers.go" ));
105
106
supportingFiles .add (new SupportingFile ("logger.mustache" , apiPath , "logger.go" ));
Original file line number Diff line number Diff line change
1
+ FROM golang:1.10 AS build
2
+ WORKDIR /go/src
3
+ COPY go ./go
4
+ COPY main.go .
5
+
6
+ ENV CGO_ENABLED=0
7
+ RUN go get -d -v ./...
8
+
9
+ RUN go build -a -installsuffix cgo -o swagger .
10
+
11
+ FROM scratch AS runtime
12
+ COPY --from=build /go/src/swagger ./
13
+ EXPOSE 8080/tcp
14
+ ENTRYPOINT ["./swagger" ]
You can’t perform that action at this time.
0 commit comments