diff --git a/examples/demo/client/Dockerfile b/examples/demo/client/Dockerfile index 2d5ea64da53a4..41712e2422d67 100644 --- a/examples/demo/client/Dockerfile +++ b/examples/demo/client/Dockerfile @@ -11,9 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.18 +FROM golang:1.18 as build COPY . /usr/src/client/ WORKDIR /usr/src/client/ RUN go env -w GOPROXY=direct RUN go install ./main.go +FROM alpine:3.15 +COPY --from=build /go/bin/main /go/bin/main CMD ["/go/bin/main"] diff --git a/examples/demo/server/Dockerfile b/examples/demo/server/Dockerfile index 731731dd13d80..d9383bfa8403f 100644 --- a/examples/demo/server/Dockerfile +++ b/examples/demo/server/Dockerfile @@ -11,9 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.18 +FROM golang:1.18 as build COPY . /usr/src/server/ WORKDIR /usr/src/server/ RUN go env -w GOPROXY=direct RUN go install ./main.go +FROM alpine:3.15 +COPY --from=build /go/bin/main /go/bin/main CMD ["/go/bin/main"]