jfyne / docker-grpcwebproxy

Dockered https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy
5 stars 5 forks source link

undefined: transport.StreamFromContext #2

Closed n0mer closed 6 years ago

n0mer commented 6 years ago

@jfyne i'm getting this error during docker build:

# go get -u github.com/improbable-eng/grpc-web/go/grpcwebproxy
# github.com/mwitkow/grpc-proxy/proxy
src/github.com/mwitkow/grpc-proxy/proxy/handler.go:63:30: undefined: transport.StreamFromContext
n0mer commented 6 years ago

https://github.com/improbable-eng/grpc-web/issues/153

jfyne commented 6 years ago

@n0mer this should fix that build error and get you back up and running again

n0mer commented 6 years ago

@jfyne this fixed my build error (link to discussion: https://github.com/improbable-eng/grpc-web/issues/152#issuecomment-376973723 )

from golang:alpine as builder
RUN apk --no-cache add git
RUN go get -v -u github.com/golang/dep/cmd/dep
RUN go get -v github.com/improbable-eng/grpc-web/go/grpcwebproxy ; exit 0
RUN cd src/github.com/improbable-eng/grpc-web && dep ensure
RUN go get -v -u github.com/improbable-eng/grpc-web/go/grpcwebproxy

from alpine
RUN apk --no-cache add ca-certificates
WORKDIR /
COPY --from=builder /go/bin/grpcwebproxy .
CMD ["/grpcwebproxy", "--backend_addr=localhost:8080", "--run_tls_server=false"]