diff --git a/Makefile b/Makefile index e3b6b94..fa65447 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ plugin: example: plugin cd "$(ROOT_DIR)"/net/grpc/gateway/examples/echo && make -standalone-proxy: package +standalone-proxy: package_static cd "$(ROOT_DIR)"/net/grpc/gateway/examples/echo && make standalone-proxy echo_server: diff --git a/net/grpc/gateway/docker/debian_stretch/Dockerfile b/net/grpc/gateway/docker/debian_stretch/Dockerfile index 51872fd..45a0794 100644 --- a/net/grpc/gateway/docker/debian_stretch/Dockerfile +++ b/net/grpc/gateway/docker/debian_stretch/Dockerfile @@ -12,39 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# BUILD -# -# Option 1: Only the Nginx gateway -# -# $ docker build \ -# -t grpc-web \ -# -f net/grpc/gateway/docker/debian_stretch/Dockerfile . -# -# Option 2: With end-to-end example -# -# $ docker build \ -# -t grpc-web \ -# --build-arg with_examples=true \ -# -f net/grpc/gateway/docker/debian_stretch/Dockerfile . -# -# RUN -# -# 1. Run the docker container -# -# $ docker run -t -p 8080:8080 grpc-web -# -# 2. Browser example: -# (if you had built the end-to-end example with Option 2 in the BUILD section) -# -# Point a web browser to -# -# http://localhost:8080/net/grpc/gateway/examples/echo/echotest.html - FROM debian:stretch -ARG with_examples=false ARG MAKEFLAGS=-j8 -ENV with_examples $with_examples ENV EMBED_OPENSSL false RUN apt-get update && apt-get install -y \ @@ -71,10 +41,4 @@ RUN cd /github/grpc-web/third_party/grpc && \ make && make install RUN cd /github/grpc-web && \ - make package - -RUN cd /github/grpc-web && \ - ./scripts/build_examples.sh - -EXPOSE 8080 -CMD ["/github/grpc-web/gConnector/run_example.sh"] + make diff --git a/net/grpc/gateway/docker/nginx/Dockerfile b/net/grpc/gateway/docker/nginx/Dockerfile index ca4518f..8aa295d 100644 --- a/net/grpc/gateway/docker/nginx/Dockerfile +++ b/net/grpc/gateway/docker/nginx/Dockerfile @@ -21,4 +21,4 @@ RUN cd /github/grpc-web && \ make standalone-proxy EXPOSE 8080 -CMD ["/github/grpc-web/gConnector/nginx.sh"] +CMD ["/github/grpc-web/gConnector_static/nginx.sh"] diff --git a/net/grpc/gateway/docker/ubuntu_14_04/Dockerfile b/net/grpc/gateway/docker/ubuntu_14_04/Dockerfile index 6014131..7b664a6 100644 --- a/net/grpc/gateway/docker/ubuntu_14_04/Dockerfile +++ b/net/grpc/gateway/docker/ubuntu_14_04/Dockerfile @@ -12,39 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# BUILD -# -# Option 1: Only the Nginx gateway -# -# $ docker build \ -# -t grpc-web \ -# -f net/grpc/gateway/docker/ubuntu_14_04/Dockerfile . -# -# Option 2: With end-to-end example -# -# $ docker build \ -# -t grpc-web \ -# --build-arg with_examples=true \ -# -f net/grpc/gateway/docker/ubuntu_14_04/Dockerfile . -# -# RUN -# -# 1. Run the docker container -# -# $ docker run -t -p 8080:8080 grpc-web -# -# 2. Browser example: -# (if you had built the end-to-end example with Option 2 in the BUILD section) -# -# Point a web browser to -# -# http://localhost:8080/net/grpc/gateway/examples/echo/echotest.html - FROM ubuntu:14.04 -ARG with_examples=false ARG MAKEFLAGS=-j8 -ENV with_examples $with_examples ENV EMBED_OPENSSL false RUN apt-get update && apt-get install -y \ @@ -74,10 +44,4 @@ RUN cd /github/grpc-web/third_party/grpc && \ make && make install RUN cd /github/grpc-web && \ - make package - -RUN cd /github/grpc-web && \ - ./scripts/build_examples.sh - -EXPOSE 8080 -CMD ["/github/grpc-web/gConnector/run_example.sh"] + make diff --git a/net/grpc/gateway/docker/ubuntu_16_04/Dockerfile b/net/grpc/gateway/docker/ubuntu_16_04/Dockerfile index e107f2e..3244043 100644 --- a/net/grpc/gateway/docker/ubuntu_16_04/Dockerfile +++ b/net/grpc/gateway/docker/ubuntu_16_04/Dockerfile @@ -12,39 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# BUILD -# -# Option 1: Only the Nginx gateway -# -# $ docker build \ -# -t grpc-web \ -# -f net/grpc/gateway/docker/ubuntu_16_04/Dockerfile . -# -# Option 2: With end-to-end example -# -# $ docker build \ -# -t grpc-web \ -# --build-arg with_examples=true \ -# -f net/grpc/gateway/docker/ubuntu_16_04/Dockerfile . -# -# RUN -# -# 1. Run the docker container -# -# $ docker run -t -p 8080:8080 grpc-web -# -# 2. Browser example: -# (if you had built the end-to-end example with Option 2 in the BUILD section) -# -# Point a web browser to -# -# http://localhost:8080/net/grpc/gateway/examples/echo/echotest.html - FROM ubuntu:16.04 -ARG with_examples=false ARG MAKEFLAGS=-j8 -ENV with_examples $with_examples ENV EMBED_OPENSSL false RUN apt-get update && apt-get install -y \ @@ -70,10 +40,4 @@ RUN cd /github/grpc-web/third_party/grpc && \ make && make install RUN cd /github/grpc-web && \ - make package - -RUN cd /github/grpc-web && \ - ./scripts/build_examples.sh - -EXPOSE 8080 -CMD ["/github/grpc-web/gConnector/run_example.sh"] + make diff --git a/net/grpc/gateway/examples/echo/Makefile b/net/grpc/gateway/examples/echo/Makefile index c6b1d12..409b9f6 100644 --- a/net/grpc/gateway/examples/echo/Makefile +++ b/net/grpc/gateway/examples/echo/Makefile @@ -42,9 +42,9 @@ package: zip -r $(ROOT_DIR)/gConnector.zip $(ROOT_DIR)/gConnector/* standalone-proxy: - mkdir -p $(ROOT_DIR)/gConnector/$(EXAMPLES_PATH) - cp nginx.conf $(ROOT_DIR)/gConnector/conf - zip -r $(ROOT_DIR)/gConnector.zip $(ROOT_DIR)/gConnector/* + mkdir -p $(ROOT_DIR)/gConnector_static/$(EXAMPLES_PATH) + cp nginx.conf $(ROOT_DIR)/gConnector_static/conf + zip -r $(ROOT_DIR)/gConnector_static.zip $(ROOT_DIR)/gConnector_static/* echo_server: echo.pb.o echo.grpc.pb.o echo_server.o echo_service_impl.o $(CXX) $^ $(LDFLAGS) -o $@ diff --git a/scripts/kokoro.sh b/scripts/kokoro.sh index bdb6e69..9b087e3 100755 --- a/scripts/kokoro.sh +++ b/scripts/kokoro.sh @@ -26,9 +26,6 @@ do { echo >&2 "$p is required but not installed. Aborting."; exit 1; } done -docker build -t grpc-web:ubuntu_16_04 \ - -f net/grpc/gateway/docker/ubuntu_16_04/Dockerfile . - docker-compose build bazel test \