mirror of https://github.com/knative/docs.git
Fix gRPC sample Dockerfile (#4967)
This commit is contained in:
parent
b80b572a88
commit
7eab64dc9d
|
@ -15,15 +15,15 @@
|
|||
# Use the official Golang image to create a build artifact.
|
||||
# This is based on Debian and sets the GOPATH to /go.
|
||||
# https://hub.docker.com/_/golang
|
||||
FROM golang:1.13 as builder
|
||||
|
||||
# Retrieve the dependencies.
|
||||
RUN go get google.golang.org/grpc
|
||||
FROM golang as builder
|
||||
|
||||
# Copy local code to the container image.
|
||||
WORKDIR /go/src/github.com/knative/docs/code-samples/serving/grpc-ping-go
|
||||
COPY . ./
|
||||
|
||||
RUN go mod init grpc-ping-go
|
||||
RUN go mod tidy
|
||||
|
||||
# Build the command inside the container.
|
||||
# To facilitate gRPC testing, this container includes a client command.
|
||||
RUN CGO_ENABLED=0 go build -tags=grpcping -o ./ping-server
|
||||
|
|
Loading…
Reference in New Issue