William Cheng c1931c10da
Add tests with optional body for go-server (#22034)
* add tests with optional body for go-server

* update workfllow
2025-09-27 14:28:28 +08:00

16 lines
268 B
Docker

FROM golang:1.19 AS build
WORKDIR /go/src
COPY go ./go
COPY main.go .
COPY go.sum .
COPY go.mod .
ENV CGO_ENABLED=0
RUN go build -o petstoreserver .
FROM scratch AS runtime
COPY --from=build /go/src/petstoreserver ./
EXPOSE 8080/tcp
ENTRYPOINT ["./petstoreserver"]