You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/10/25 18:37:49 UTC

[GitHub] jonpspri closed pull request #243: Adding provisions for building s390x (Linux on Z) images of openwhisk-apigateway

jonpspri closed pull request #243: Adding provisions for building s390x (Linux on Z) images of openwhisk-apigateway
URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/243
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.gitignore b/.gitignore
index a9d0ef1..54cf5c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,15 @@ secrets.yml
 
 # npm
 npm-debug.log
+
+# Temporary files
+tmp.*
+._*
+
+# Profiling files
+api-gateway.conf.profiling*
+Dockerfile.profiling
+kernel-src
+
+# Generated files
+Dockerfile.generated
diff --git a/.profiling.after b/.profiling.after
deleted file mode 100644
index a078925..0000000
--- a/.profiling.after
+++ /dev/null
@@ -1,7 +0,0 @@
-COPY ./api-gateway.conf.profiling /etc/api-gateway/api-gateway.conf
-RUN apt-get install -y git && mkdir -p /profiling && git clone https://github.com/openresty/stapxx.git && cd stapxx && git clone https://github.com/brendangregg/FlameGraph.git && apt-get remove -y git
-RUN apt-get install -y linux-headers-`uname -r` kbuild gcc 
-ENV LD_LIBRARY_PATH /usr/local/lib 
-WORKDIR /tmp/stapxx
-ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
-CMD ["/etc/init-container.sh"]
diff --git a/.profiling.before b/.profiling.before
deleted file mode 100644
index a17091d..0000000
--- a/.profiling.before
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM ubuntu:latest
-
-RUN apt-get update && apt-get install -y gcc make g++ gettext git python zlib1g-dev bzip2 wget m4 git
-WORKDIR /tmp
-RUN wget https://sourceware.org/elfutils/ftp/0.168/elfutils-0.168.tar.bz2 && tar -jxf elfutils-0.168.tar.bz2 && cd elfutils-0.168 && ./configure && make -j4 && make install
-
-RUN wget https://sourceware.org/systemtap/ftp/releases/systemtap-3.1.tar.gz && tar -zxf systemtap-3.1.tar.gz && cd systemtap-3.1 && ./configure && make -j4 && make install
-RUN cp /proc/kallsyms /boot/System.map-`uname -r`
-RUN mkdir -p /usr/local/share/perl5/site_perl
diff --git a/.travis.yml b/.travis.yml
index 337bdce..9019a4b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,9 +36,11 @@ deploy:
     script: ./tools/travis/deploy.sh openwhisk apigateway latest
     on:
       branch: master
+      repo: apache/incubator-openwhisk-api
   # deploy tag
   - provider: script
     script: ./tools/travis/deploy.sh openwhisk apigateway $TRAVIS_TAG
     on:
       tags: true
       all_branches: true
+      repo: apache/incubator-openwhisk-api
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 6ac7126..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,203 +0,0 @@
-# apigateway
-#
-# VERSION               1.9.7.3
-#
-# From https://hub.docker.com/_/alpine/
-#
-FROM alpine:latest
-
-# install dependencies
-RUN apk update \
-    && apk add gcc tar libtool zlib jemalloc jemalloc-dev perl \
-    ca-certificates wget make musl-dev openssl-dev pcre-dev g++ zlib-dev curl python \
-    perl-test-longstring perl-list-moreutils perl-http-message geoip-dev \
-    && update-ca-certificates
-
-# openresty build
-ENV OPENRESTY_VERSION=1.9.7.3 \
-    NAXSI_VERSION=0.53-2 \
-    PCRE_VERSION=8.37 \
-    TEST_NGINX_VERSION=0.24 \
-    _prefix=/usr/local \
-    _exec_prefix=/usr/local \
-    _localstatedir=/var \
-    _sysconfdir=/etc \
-    _sbindir=/usr/local/sbin
-
-RUN  echo " ... adding Openresty, NGINX, NAXSI and PCRE" \
-     && mkdir -p /tmp/api-gateway \
-     && readonly NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \
-     && echo "using up to $NPROC threads" \
-
-     && cd /tmp/api-gateway/ \
-     && curl -k -L https://github.com/nbs-system/naxsi/archive/${NAXSI_VERSION}.tar.gz -o /tmp/api-gateway/naxsi-${NAXSI_VERSION}.tar.gz \
-     && curl -k -L http://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VERSION}/pcre-${PCRE_VERSION}.tar.gz -o /tmp/api-gateway/pcre-${PCRE_VERSION}.tar.gz \
-     && curl -k -L https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz -o /tmp/api-gateway/openresty-${OPENRESTY_VERSION}.tar.gz \
-     && tar -zxf ./openresty-${OPENRESTY_VERSION}.tar.gz \
-     && tar -zxf ./pcre-${PCRE_VERSION}.tar.gz \
-     && tar -zxf ./naxsi-${NAXSI_VERSION}.tar.gz \
-     && cd /tmp/api-gateway/openresty-${OPENRESTY_VERSION} \
-
-     && echo "        - building debugging version of the api-gateway ... " \
-     && ./configure \
-            --prefix=${_exec_prefix}/api-gateway \
-            --sbin-path=${_sbindir}/api-gateway-debug \
-            --conf-path=${_sysconfdir}/api-gateway/api-gateway.conf \
-            --error-log-path=${_localstatedir}/log/api-gateway/error.log \
-            --http-log-path=${_localstatedir}/log/api-gateway/access.log \
-            --pid-path=${_localstatedir}/run/api-gateway.pid \
-            --lock-path=${_localstatedir}/run/api-gateway.lock \
-            --add-module=../naxsi-${NAXSI_VERSION}/naxsi_src/ \
-            --with-pcre=../pcre-${PCRE_VERSION}/ --with-pcre-jit \
-            --with-stream \
-            --with-stream_ssl_module \
-            --with-http_ssl_module \
-            --with-http_stub_status_module \
-            --with-http_realip_module \
-            --with-http_addition_module \
-            --with-http_sub_module \
-            --with-http_dav_module \
-            --with-http_geoip_module \
-            --with-http_gunzip_module  \
-            --with-http_gzip_static_module \
-            --with-http_auth_request_module \
-            --with-http_random_index_module \
-            --with-http_secure_link_module \
-            --with-http_degradation_module \
-            --with-http_auth_request_module  \
-            --with-http_v2_module \
-            --with-luajit \
-            --without-http_ssi_module \
-            --without-http_userid_module \
-            --without-http_uwsgi_module \
-            --without-http_scgi_module \
-            --with-debug \
-            -j${NPROC} \
-    && make -j${NPROC} \
-    && make install \
-
-    && echo "        - building regular version of the api-gateway ... " \
-    && ./configure \
-            --prefix=${_exec_prefix}/api-gateway \
-            --sbin-path=${_sbindir}/api-gateway \
-            --conf-path=${_sysconfdir}/api-gateway/api-gateway.conf \
-            --error-log-path=${_localstatedir}/log/api-gateway/error.log \
-            --http-log-path=${_localstatedir}/log/api-gateway/access.log \
-            --pid-path=${_localstatedir}/run/api-gateway.pid \
-            --lock-path=${_localstatedir}/run/api-gateway.lock \
-            --add-module=../naxsi-${NAXSI_VERSION}/naxsi_src/ \
-            --with-pcre=../pcre-${PCRE_VERSION}/ --with-pcre-jit \
-            --with-stream \
-            --with-stream_ssl_module \
-            --with-http_ssl_module \
-            --with-http_stub_status_module \
-            --with-http_realip_module \
-            --with-http_addition_module \
-            --with-http_sub_module \
-            --with-http_dav_module \
-            --with-http_geoip_module \
-            --with-http_gunzip_module  \
-            --with-http_gzip_static_module \
-            --with-http_auth_request_module \
-            --with-http_random_index_module \
-            --with-http_secure_link_module \
-            --with-http_degradation_module \
-            --with-http_auth_request_module  \
-            --with-http_v2_module \
-            --with-luajit \
-            --without-http_ssi_module \
-            --without-http_userid_module \
-            --without-http_uwsgi_module \
-            --without-http_scgi_module \
-            -j${NPROC} \
-    && make -j${NPROC} \
-    && make install \
-
-    && echo "        - adding Nginx Test support" \
-    && curl -k -L https://github.com/openresty/test-nginx/archive/v${TEST_NGINX_VERSION}.tar.gz -o ${_prefix}/test-nginx-${TEST_NGINX_VERSION}.tar.gz \
-    && cd ${_prefix} \
-    && tar -xf ${_prefix}/test-nginx-${TEST_NGINX_VERSION}.tar.gz \
-    && rm ${_prefix}/test-nginx-${TEST_NGINX_VERSION}.tar.gz \
-    && cp -r ${_prefix}/test-nginx-0.24/inc/* /usr/local/share/perl5/site_perl/ \
-
-    && ln -s ${_sbindir}/api-gateway-debug ${_sbindir}/nginx \
-    && cp /tmp/api-gateway/openresty-${OPENRESTY_VERSION}/build/install ${_prefix}/api-gateway/bin/resty-install \
-    && apk del g++ gcc make \
-    && rm -rf /var/cache/apk/* \
-    && rm -rf /tmp/api-gateway
-
-ENV OPM_VERSION 0.0.3
-RUN echo " ... installing opm..." \
-    && mkdir -p /tmp/api-gateway \
-    && curl -k -L https://github.com/openresty/opm/archive/v${OPM_VERSION}.tar.gz -o /tmp/api-gateway/opm-${OPM_VERSION}.tar.gz \
-    && tar -xf /tmp/api-gateway/opm-${OPM_VERSION}.tar.gz -C /tmp/api-gateway \
-    && cd /tmp/api-gateway/opm-${OPM_VERSION} \
-    && cp bin/opm ${_prefix}/api-gateway/bin \
-    && cd ${_prefix}/api-gateway \
-    && mkdir -p site/manifest site/pod \
-    && cd site \
-    && ln -s ../lualib ./ \
-    && ln -s ${_prefix}/api-gateway/bin/opm /usr/bin/opm \
-    && ln -s ${_prefix}/api-gateway/bin/resty /usr/bin/resty
-
-ENV LUA_RESTY_HTTP_VERSION 0.10
-RUN opm get pintsized/lua-resty-http=${LUA_RESTY_HTTP_VERSION}
-ENV LUA_RESTY_IPUTILS_VERSION 0.2.1
-RUN opm get hamishforbes/lua-resty-iputils=${LUA_RESTY_IPUTILS_VERSION}
-ENV LUA_RESTY_STRING_VERSION 0.09
-RUN opm get openresty/lua-resty-string=${LUA_RESTY_STRING_VERSION}
-ENV LUA_RESTY_LRUCACHE_VERSION 0.04
-RUN opm get openresty/lua-resty-lrucache=${LUA_RESTY_LRUCACHE_VERSION}
-ENV LUA_RESTY_CJOSE_VERSION 0.3
-RUN opm get taylorking/lua-resty-cjose=${LUA_RESTY_CJOSE_VERSION}
-RUN opm get taylorking/lua-resty-rate-limit
-
-
-ENV NETURL_LUA_VERSION 0.9-1
-RUN echo " ... installing neturl.lua ... " \
-    && mkdir -p /tmp/api-gateway \
-    && curl -k -L https://github.com/golgote/neturl/archive/${NETURL_LUA_VERSION}.tar.gz -o /tmp/api-gateway/neturl.lua-${NETURL_LUA_VERSION}.tar.gz \
-    && tar -xf /tmp/api-gateway/neturl.lua-${NETURL_LUA_VERSION}.tar.gz -C /tmp/api-gateway/ \
-    && export LUA_LIB_DIR=${_prefix}/api-gateway/lualib \
-    && cd /tmp/api-gateway/neturl-${NETURL_LUA_VERSION} \
-    && cp lib/net/url.lua ${LUA_LIB_DIR} \
-    && rm -rf /tmp/api-gateway
-
-ENV CJOSE_VERSION 0.5.1
-RUN echo " ... installing cjose ... " \
-    && apk update && apk add automake autoconf git gcc make jansson jansson-dev \
-    && mkdir -p /tmp/api-gateway \
-    && curl -L -k https://github.com/cisco/cjose/archive/${CJOSE_VERSION}.tar.gz -o /tmp/api-gateway/cjose-${CJOSE_VERSION}.tar.gz \
-    && tar -xf /tmp/api-gateway/cjose-${CJOSE_VERSION}.tar.gz -C /tmp/api-gateway/ \
-    && cd /tmp/api-gateway/cjose-${CJOSE_VERSION} \
-    && sh configure \
-    && make && make install
-RUN mkdir -p /tmp/api-gateway
-
-
-RUN \
-    curl -L -k -s -o /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 \
-    && apk update \
-    && apk add gawk \
-    && chmod 755 /usr/local/bin/jq \
-    && rm -rf /var/cache/apk/*
-
-RUN \
-    echo " ... installing dumb-init ... " \
-    && wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 \
-    && chmod +x /usr/local/bin/dumb-init
-
-COPY init.sh /etc/init-container.sh
-ONBUILD COPY init.sh /etc/init-container.sh
-# add the default configuration for the Gateway
-COPY . /etc/api-gateway
-RUN adduser -S nginx-api-gateway \
-    && addgroup -S nginx-api-gateway
-ONBUILD COPY . /etc/api-gateway
-
-EXPOSE 80 8080 8423 9000
-
-ENV LD_LIBRARY_PATH /usr/local/lib
-
-ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
-CMD ["/etc/init-container.sh"]
diff --git a/Makefile b/Makefile
index ee90289..7702d8d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,69 @@
-DOCKER_TAG ?= snapshot-`date +'%Y%m%d-%H%M'`
-DOCKER_REGISTRY ?= ''
+#
+#  Figure out a few of the environmental aspects of docker
+#
+DOCKER_ARCH = $(shell sh -c "docker info 2>/dev/null | sed -n -e 's/^Architecture: \(.*\)/\1/p'")
+DOCKER_KERNEL_VERSION = $(shell sh -c "docker info 2>/dev/null | sed -n -e 's/^Kernel Version: \([^-]*\).*/\1/;T;s/.0$$//;p'")
+DOCKER_KERNEL_MAJOR = $(shell sh -c "docker info 2>/dev/null | sed -n -e 's/^Kernel Version: \([0-9]*\).*/\1/p'")
 
-docker:
-	docker build -t openwhisk/apigateway .
+#
+#  Default tags.  To override for a given run, use 'DOCKER_TAG=mytag make ...'
+#
+DOCKER_RUN_TAG = openwhisk/apigateway:latest
+DOCKER_PROFILE_TAG = openwhisk/apigateway-profiling:latest
+
+#  Architecture-dependent manipulations of the Dockerfile
+#
+#  Note:  The variables don't bind until execution time, so the default
+#         for DOCKER_DISTRO is set below in 'docker' and 'profile-build'
+#         and could be set for other build steps.
+ifeq "$(DOCKER_ARCH)" "s390x"
+SEDCMD = s!^FROM \(alpine\|ubuntu\):!FROM $(DOCKER_ARCH)/$(DOCKER_DISTRO):!
+else
+SEDCMD = s!^FROM \(alpine\|ubuntu\):!FROM $(DOCKER_DISTRO):!
+endif
+
+docker/Dockerfile.generated: docker/Dockerfile
+	sed -e '$(SEDCMD)' <docker/Dockerfile >docker/Dockerfile.generated
+
+.PHONY: docker
+docker: DOCKER_DISTRO ?= alpine
+docker: DOCKER_TAG ?= $(DOCKER_RUN_TAG)
+docker: docker/Dockerfile.generated
+	cd docker && docker build -t $(DOCKER_TAG) --build-arg DISTRO=$(DOCKER_DISTRO) -f Dockerfile.generated .
 
 .PHONY: docker-ssh
+docker-ssh: DOCKER_TAG ?= $(DOCKER_RUN_TAG)
 docker-ssh:
-	docker run -ti --entrypoint='bash' openwhisk/apigateway:latest
+	cd docker && docker run -ti --entrypoint='bash' $(DOCKER_TAG)
 
 .PHONY: test-build
 test-build:
 	cd tests; ./install-deps.sh
 
 .PHONY: profile-build
+profile-build: DOCKER_DISTRO ?= ubuntu
+profile-build: DOCKER_TAG ?= $(DOCKER_PROFILE_TAG)
 profile-build:
-	./build_profiling.sh
-	docker build -t openwhisk/apigateway-profiling -f Dockerfile.profiling .
+	cd docker \
+	&& sed -e 's/worker_processes\ *auto;/worker_processes\ 1;/g' etc-api-gateway/api-gateway.conf > ./api-gateway.conf.profiling \
+	&& sed -e '$(SEDCMD)' -e 's/^#PROFILE //' Dockerfile > Dockerfile.profiling \
+	&& docker build --build-arg PROFILE=yes --build-arg DISTRO=$(DOCKER_DISTRO) \
+			-t $(DOCKER_TAG) -f Dockerfile.profiling .
+
+#
+#  Download kernel source for the current Docker kernel in support of
+#  profiling
+#
+kernel-src/linux-$(DOCKER_KERNEL_VERSION):
+		echo $(DOCKER_KERNEL_VERSION); \
+		mkdir -p kernel-src; \
+    curl -L \
+			"https://cdn.kernel.org/pub/linux/kernel/v$(DOCKER_KERNEL_MAJOR).x/linux-$(DOCKER_KERNEL_VERSION).tar.gz" \
+			| tar zfx - -C kernel-src
 
 .PHONY: profile-run
-profile-run: profile-build 
+profile-run: DOCKER_TAG ?= $(DOCKER_PROFILE_TAG)
+profile-run: profile-build kernel-src/linux-$(DOCKER_KERNEL_VERSION)
 	docker run --rm --name="apigateway" --privileged -p 80:80 -p ${PUBLIC_MANAGEDURL_PORT}:8080 -p 9000:9000 \
 		-e PUBLIC_MANAGEDURL_HOST=${PUBLIC_MANAGEDURL_HOST} -e PUBLIC_MANAGEDURL_PORT=${PUBLIC_MANAGEDURL_PORT} \
 		-e REDIS_HOST=${REDIS_HOST} -e REDIS_PORT=${REDIS_PORT} -e REDIS_PASS=${REDIS_PASS} \
@@ -30,13 +75,15 @@ profile-run: profile-build
 		-e CACHE_SIZE=2048 \
 		-e CACHE_TTL=180 \
 		-e OPTIMIZE=1 \
-		-d openwhisk/apigateway-profiling:latest
+		-v `pwd`/kernel-src:/usr/src \
+		$(DOCKER_TAG)
 
 .PHONY: test-run
 test-run:
 	cd tests; ./run-tests.sh
 
 .PHONY: docker-run
+docker-run: DOCKER_TAG ?= $(DOCKER_RUN_TAG)
 docker-run:
 	docker run --rm --name="apigateway" -p 80:80 -p ${PUBLIC_MANAGEDURL_PORT}:8080 -p 9000:9000 \
 		-e PUBLIC_MANAGEDURL_HOST=${PUBLIC_MANAGEDURL_HOST} -e PUBLIC_MANAGEDURL_PORT=${PUBLIC_MANAGEDURL_PORT} \
@@ -46,9 +93,10 @@ docker-run:
 		-e TOKEN_GITHUB_URL=https://api.github.com/user \
 		-e APPID_PKURL=https://appid-oauth.ng.bluemix.net/oauth/v3/ \
 		-e LD_LIBRARY_PATH=/usr/local/lib \
-		openwhisk/apigateway:latest
+		$(DOCKER_TAG)
 
 .PHONY: docker-debug
+docker-debug: DOCKER_TAG ?= $(DOCKER_RUN_TAG)
 docker-debug:
 	#Volumes directories must be under your Users directory
 	mkdir -p ${HOME}/tmp/apiplatform/apigateway
@@ -58,7 +106,7 @@ docker-debug:
 			-p 80:80 -p 5000:5000 \
 			-e "LOG_LEVEL=info" -e "DEBUG=true" \
 			-v ${HOME}/tmp/apiplatform/apigateway/:/etc/api-gateway \
-			openwhisk/apigateway:latest ${DOCKER_ARGS}
+			$(DOCKER_TAG) ${DOCKER_ARGS}
 
 .PHONY: docker-reload
 docker-reload:
@@ -74,3 +122,8 @@ docker-attach:
 docker-stop:
 	docker stop apigateway
 	docker rm apigateway
+
+.PHONY: clean
+clean:
+	rm -f docker/Dockerfile.generated docker/Dockerfile.profiling \
+		docker/api-gateway.conf.profiling* kernel-src/*
diff --git a/build_profiling.sh b/build_profiling.sh
deleted file mode 100755
index 9161855..0000000
--- a/build_profiling.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-cp Dockerfile Dockerfile.profiling
-
-sed -i -e 's/FROM\ alpine.*//g' "Dockerfile.profiling"
-sed -i -e 's/apk\ update/apt-get\ update/g' "Dockerfile.profiling" 
-sed -i -e 's/apk\ add/apt-get\ install\ -y/g' "Dockerfile.profiling" 
-sed -i -e 's/apk\ del/apt-get\ remove\ -y/g' "Dockerfile.profiling"
-sed -i -e 's/pcre-dev/libpcre2-dev/g' "Dockerfile.profiling"
-sed -i -e 's/zlib/zlibc/g' "Dockerfile.profiling"
-sed -i -e 's/zlibc-dev/lua-zlib\ lua-zlib-dev/g' "Dockerfile.profiling" 
-sed -i -e 's/perl-test-longstring/libtest-longstring-perl/g' "Dockerfile.profiling"
-sed -i -e 's/perl-list-moreutils/liblist-moreutils-perl/g' "Dockerfile.profiling" 
-sed -i -e 's/perl-http-message/libhttp-message-perl/g' "Dockerfile.profiling" 
-sed -i -e 's/geoip-dev/libgeoip-dev/g' "Dockerfile.profiling"
-sed -i -e 's/jemalloc/libjemalloc1/g' "Dockerfile.profiling" 
-sed -i -e 's/libjemalloc1-dev/libjemalloc-dev/g' "Dockerfile.profiling" 
-sed -i -e 's/openssl-dev/libssl-dev/g' "Dockerfile.profiling" 
-sed -i -e 's/--with-debug/--with-debug\ --with-dtrace-probes/g' "Dockerfile.profiling"
-sed -i -e 's/OPENRESTY_VERSION=.*\ /OPENRESTY_VERSION=1.11.2.2\ /g' "Dockerfile.profiling"
-sed -i -e 's/adduser\ -S.*/useradd\ nginx-api-gateway/g' "Dockerfile.profiling" 
-sed -i -e 's/&&\ addgroup.*//g' "Dockerfile.profiling"
-sed -i -e 's/ENTRYPOINT.*//g' "Dockerfile.profiling" 
-sed -i -e 's/CMD.*//g' "Dockerfile.profiling"
-
-cp api-gateway.conf api-gateway.conf.profiling
-sed -i -e 's/worker_processes\ *auto;/worker_processes\ 1;/g' "api-gateway.conf.profiling"
-
-cat .profiling.before | cat - Dockerfile.profiling > /tmp/out && mv /tmp/out Dockerfile.profiling
-cat Dockerfile.profiling | cat - .profiling.after > /tmp/out && mv /tmp/out Dockerfile.profiling
-
-if [[ -f "Dockerfile.profiling-e" ]]; then
-	rm Dockerfile.profiling-e
-fi
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 0000000..cb3088c
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,281 @@
+# apigateway
+#
+# VERSION               1.9.7.3
+#
+# From https://hub.docker.com/_/alpine/
+#
+FROM ubuntu:latest
+
+LABEL image_name=apigateway tags=1.11.2.2,1.11.2,1.11,latest
+
+#
+#  Pass the build an environment override for PROFILE to activate profiling
+#
+ARG DISTRO=ubuntu
+ARG PROFILE=
+RUN if [ "$DISTRO" = "ubuntu" ]; then \
+      apt-get update && sh -c "apt-get install -y --no-install-recommends \
+        ca-certificates \
+        curl \
+        file \
+        gcc g++ \
+        jq \
+        libgeoip1 \
+        libgeoip-dev \
+        libjansson4 \
+        libjansson-dev \
+        libssl1.0.0 \
+        libssl-dev \
+        make \
+        perl \
+        ${PROFILE:+elfutils systemtap systemtap-sdt-dev}" \
+      && apt-get clean && rm -rf /var/lib/apt/lists/* \
+  ; elif [ "$DISTRO" = "alpine" ] && [ -n "$PROFILE" ]; then \
+      echo "Alpine does not support profiling." && exit 1 \
+  ; elif [ "$DISTRO" = "alpine" ]; then \
+      apk add --no-cache \
+          bash \
+          ca-certificates \
+          jq \
+          geoip \
+          jansson \
+          libgcc \
+          openssl \
+          perl \
+      && apk add --no-cache --virtual .build-deps \
+          curl \
+          file \
+          gcc g++ \
+          geoip-dev \
+          jansson-dev \
+          openssl-dev \
+          make \
+  ; else \
+        echo "UNRECOGNIZED DISTRO $DISTRO" && exit 1 \
+  ; fi
+
+#
+#  If profiling is requested, set up certain extra software.
+RUN if [ -n "${PROFILE}" ]; then : \
+      && cp /proc/kallsyms /boot/System.map-`uname -r` \
+      && mkdir -p /usr/local/share/perl5/site_perl /profiling/stapxx/FlameGraph \
+      && curl -L https://api.github.com/repos/openresty/stapxx/tarball/master \
+        | tar zxf - --strip-components=1 -C /profiling/stapxx\
+      && curl -L https://api.github.com/repos/brendangregg/FlameGraph/tarball/master \
+        | tar zxf - --strip-components=1 -C /profiling/stapxx/FlameGraph \
+    ; fi
+
+#
+#  The S390X architecture needs a very specific patch to LuaJIT to work, so we
+#  download andcompile it here for OpenRESTY to use later.  In the interests of
+#  balancing workload across RUN stanzas, we always run this step.
+#
+ENV LUAJIT_VERSION=2.1.0-beta2 LUAJIT_DIR=/usr/local/api-gateway/luajit
+RUN echo " ... compiling and installing LuaJIT" \
+  && if [ "`uname -m`" = "s390x" ]; then \
+       luajit_url="https://api.github.com/repos/linux-on-ibm-z/LuaJIT/tarball/v2.1" \
+     ; else \
+       luajit_url="http://luajit.org/download/LuaJIT-${LUAJIT_VERSION}.tar.gz" \
+     ; fi \
+ && mkdir -p /tmp/api-gateway/LuaJIT \
+ && cd /tmp/api-gateway/LuaJIT \
+ && echo 'Getting LuaJIT:' "$luajit_url" \
+ && curl -L "$luajit_url" \
+    | tar zxf - --strip-components=1 \
+ && make install PREFIX=${LUAJIT_DIR} \
+ && rm -rf /tmp/api-gateway/LuaJIT
+
+#
+# OpenRESTy build
+#
+#  Perhaps some of these environment variables should be build args?
+#
+ENV OPENRESTY_VERSION=1.11.2.2 \
+     NAXSI_VERSION=0.53-2 \
+     PCRE_VERSION=8.37 \
+     _prefix=/usr/local \
+     _exec_prefix=/usr/local \
+     _localstatedir=/var \
+     _sysconfdir=/etc \
+     _sbindir=/usr/local/sbin
+
+RUN  echo " ... adding Openresty, NGINX, NAXSI and PCRE" \
+     && mkdir -p /tmp/api-gateway \
+     && readonly NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \
+     && echo "using up to $NPROC threads" \
+
+     && cd /tmp/api-gateway/ \
+     && naxsi_url="https://github.com/nbs-system/naxsi/archive/${NAXSI_VERSION}.tar.gz" \
+     && echo "Getting naxsi: $naxsi_url" \
+     && curl -L "$naxsi_url" | tar zfx - \
+
+     && pcre_url="http://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VERSION}/pcre-${PCRE_VERSION}.tar.gz" \
+     && echo "Getting pcre: $pcre_url" \
+     && curl -L "$pcre_url" | tar zfx - \
+
+     && openresty_url="https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz" \
+     && echo "Getting OpenRESTY: $openresty_url" \
+     && curl -L "$openresty_url" | tar zfx - \
+
+     && cd /tmp/api-gateway/openresty-${OPENRESTY_VERSION} \
+
+    #  Configure options based on processor architecture
+     && if [ "`uname -m`" = "s390x" ]; then \
+          with_pcrejit="" ; \
+        else \
+          with_pcrejit="--with-pcre-jit" ; \
+        fi \
+
+    #  Put this into a for loop so the other arguments didn't have to be
+    #  kept in sync across multiple configure runs (a potential source of bugs)
+     && for with_debug in '--with-debug' ''; do \
+        echo " ... Building with debug flag value of '$with_debug'" \
+        #  Use sh to run configure to avoid variable tokenization anxiety
+        && sh -c "./configure \
+            --prefix=${_exec_prefix}/api-gateway \
+            --sbin-path=${_sbindir}/api-gateway${with_debug:+-debug} \
+            --conf-path=${_sysconfdir}/api-gateway/api-gateway.conf \
+            --error-log-path=${_localstatedir}/log/api-gateway/error.log \
+            --http-log-path=${_localstatedir}/log/api-gateway/access.log \
+            --pid-path=${_localstatedir}/run/api-gateway.pid \
+            --lock-path=${_localstatedir}/run/api-gateway.lock \
+            --add-module=../naxsi-${NAXSI_VERSION}/naxsi_src/ \
+            --with-pcre=../pcre-${PCRE_VERSION}/ \
+            ${with_pcrejit} \
+            --with-stream \
+            --with-stream_ssl_module \
+            --with-http_ssl_module \
+            --with-http_stub_status_module \
+            --with-http_realip_module \
+            --with-http_addition_module \
+            --with-http_sub_module \
+            --with-http_dav_module \
+            --with-http_geoip_module \
+            --with-http_gunzip_module  \
+            --with-http_gzip_static_module \
+            --with-http_auth_request_module \
+            --with-http_random_index_module \
+            --with-http_secure_link_module \
+            --with-http_degradation_module \
+            --with-http_auth_request_module  \
+            --with-http_v2_module \
+            --with-luajit=${LUAJIT_DIR} \
+            --without-http_ssi_module \
+            --without-http_userid_module \
+            --without-http_uwsgi_module \
+            --without-http_scgi_module \
+            ${with_debug} \
+            ${PROFILE:+--with-dtrace-probes} \
+            -j${NPROC} \
+            || { cat config.log; exit 1; }" \
+        && make -j${NPROC} install \
+    ; done && echo " ... Done building OpenRESTY (both varieties) ... " \
+
+    && ln -s ${_sbindir}/api-gateway-debug ${_sbindir}/nginx \
+    && cp /tmp/api-gateway/openresty-${OPENRESTY_VERSION}/build/install ${_prefix}/api-gateway/bin/resty-install \
+    && rm -rf /tmp/api-gateway
+
+ARG TEST_NGINX_VERSION=0.24
+RUN echo "        - adding Nginx Test support" \
+    && mkdir -p /usr/local/share/perl5/site_perl/ \
+
+    && test_nginx_url="https://github.com/openresty/test-nginx/archive/v${TEST_NGINX_VERSION}.tar.gz" \
+    && echo "Getting test-nginx: $test_nginx_url" \
+    && curl -L "$test_nginx_url" \
+      | tar zxfv - -C /usr/local/share/perl5/site_perl/ test-nginx-${TEST_NGINX_VERSION}/inc/ --strip-components=2 \
+    && :
+
+ARG OPM_VERSION=0.0.3
+RUN echo " ... installing opm..." \
+    && opm_url="https://github.com/openresty/opm/archive/v${OPM_VERSION}.tar.gz" \
+    && echo "Getting opm: $opm_url" \
+    && curl -L  "$opm_url" \
+        | tar zxf - -C ${_prefix}/api-gateway/bin/ opm-${OPM_VERSION}/bin/opm --strip-components=1 \
+    && mkdir -p ${_prefix}/api-gateway/site/manifest ${_prefix}/api-gateway/site/pod \
+    && ln -s ${_prefix}/api-gateway/bin/opm /usr/bin/opm \
+    && ln -s ${_prefix}/api-gateway/bin/resty /usr/bin/resty \
+    && :
+
+ENV LUA_RESTY_HTTP_VERSION=0.10 \
+    LUA_RESTY_IPUTILS_VERSION=0.2.1 \
+    LUA_RESTY_STRING_VERSION=0.09 \
+    LUA_RESTY_LRUCACHE_VERSION=0.04 \
+    LUA_RESTY_CJOSE_VERSION=0.3
+
+RUN opm get \
+     pintsized/lua-resty-http=${LUA_RESTY_HTTP_VERSION} \
+     hamishforbes/lua-resty-iputils=${LUA_RESTY_IPUTILS_VERSION} \
+     openresty/lua-resty-string=${LUA_RESTY_STRING_VERSION} \
+     openresty/lua-resty-lrucache=${LUA_RESTY_LRUCACHE_VERSION} \
+     taylorking/lua-resty-cjose=${LUA_RESTY_CJOSE_VERSION} \
+     taylorking/lua-resty-rate-limit
+
+ARG NETURL_LUA_VERSION=0.9-1
+RUN echo " ... installing neturl.lua ... " \
+    && neturl_url="https://github.com/golgote/neturl/archive/${NETURL_LUA_VERSION}.tar.gz" \
+    && echo "Getting neturl: $neturl_url" \
+    && curl -L "$neturl_url" \
+        | tar -zxf - -C ${_prefix}/api-gateway/lualib --strip-components=3 \
+            neturl-${NETURL_LUA_VERSION}/lib/net/url.lua
+
+ARG CJOSE_VERSION=0.5.1
+RUN echo " ... installing cjose ... " \
+    && mkdir -p /tmp/api-gateway \
+    && cjose_url="https://github.com/cisco/cjose/archive/${CJOSE_VERSION}.tar.gz" \
+    && echo "Getting cjose: $chose_url" \
+    && curl -L  "$cjose_url" | tar zxf - -C /tmp/api-gateway/ \
+    && cd /tmp/api-gateway/cjose-${CJOSE_VERSION} \
+    && sh configure \
+    && make install \
+    && rm -rf /tmp/api-gateway
+
+ARG DUMB_INIT_VERSION=1.2.0
+RUN echo " ... building and install dumb-init ... " \
+     && dumb_init_url="https://github.com/Yelp/dumb-init/archive/v${DUMB_INIT_VERSION}.tar.gz" \
+     && echo "Getting dumb-init: &dumb_init_url" \
+     && curl -L "$dumb_init_url" | tar zxf - -C /tmp \
+     && cd /tmp/dumb-init-${DUMB_INIT_VERSION} \
+     && make \
+     && mv ./dumb-init /usr/bin \
+     && cd /tmp && rm -rf /tmp/dumb-init-${DUMB_INIT_VERSION}
+
+RUN if [ "$DISTRO" = "ubuntu" ]; then \
+       adduser --system --group nginx-api-gateway \
+       && apt-get purge -y \
+          curl \
+          file \
+          gcc g++ \
+          libgeoip-dev \
+          libjansson-dev \
+          libssl-dev \
+          make \
+       && apt-get autoremove -y \
+       && apt-get clean \
+   ; elif [ "$DISTRO" = "alpine" ]; then \
+       addgroup -S nginx-api-gateway \
+       && adduser -S nginx-api-gateway \
+       && adduser nginx-api-gateway nginx-api-gateway \
+       && apk del .build-deps \
+   ; else \
+       echo "UNRECOGNIZED DISTRO $DISTRO" && exit 1 \
+   ; fi
+
+COPY init-container.sh /etc/init-container.sh
+ONBUILD COPY init-container.sh /etc/init-container.sh
+
+COPY etc-api-gateway /etc/api-gateway
+ONBUILD COPY etc-api-gateway /etc/api-gateway
+
+EXPOSE 80 8080 8423 9000
+
+#
+#  These lines will be automatically uncommented when building with
+#  'make build-profile'
+#
+#PROFILE COPY ./api-gateway.conf.profiling /etc/api-gateway/api-gateway.conf
+#PROFILE WORKDIR /tmp/stapxx
+#PROFILE VOLUME /usr/src
+
+ENV LD_LIBRARY_PATH /usr/local/lib
+ENTRYPOINT ["/usr/bin/dumb-init", "--"]
+CMD ["/etc/init-container.sh"]
diff --git a/api-gateway.conf b/docker/etc-api-gateway/api-gateway.conf
similarity index 100%
rename from api-gateway.conf
rename to docker/etc-api-gateway/api-gateway.conf
diff --git a/conf.d/api_gateway_init.conf b/docker/etc-api-gateway/conf.d/api_gateway_init.conf
similarity index 100%
rename from conf.d/api_gateway_init.conf
rename to docker/etc-api-gateway/conf.d/api_gateway_init.conf
diff --git a/conf.d/api_gateway_logging.conf b/docker/etc-api-gateway/conf.d/api_gateway_logging.conf
similarity index 100%
rename from conf.d/api_gateway_logging.conf
rename to docker/etc-api-gateway/conf.d/api_gateway_logging.conf
diff --git a/conf.d/blacklist.conf b/docker/etc-api-gateway/conf.d/blacklist.conf
similarity index 100%
rename from conf.d/blacklist.conf
rename to docker/etc-api-gateway/conf.d/blacklist.conf
diff --git a/conf.d/commons/common-headers.conf b/docker/etc-api-gateway/conf.d/commons/common-headers.conf
similarity index 100%
rename from conf.d/commons/common-headers.conf
rename to docker/etc-api-gateway/conf.d/commons/common-headers.conf
diff --git a/conf.d/default.conf b/docker/etc-api-gateway/conf.d/default.conf
similarity index 100%
rename from conf.d/default.conf
rename to docker/etc-api-gateway/conf.d/default.conf
diff --git a/conf.d/includes/analytics_endpoints.conf b/docker/etc-api-gateway/conf.d/includes/analytics_endpoints.conf
similarity index 100%
rename from conf.d/includes/analytics_endpoints.conf
rename to docker/etc-api-gateway/conf.d/includes/analytics_endpoints.conf
diff --git a/conf.d/includes/basic_endpoints.conf b/docker/etc-api-gateway/conf.d/includes/basic_endpoints.conf
similarity index 100%
rename from conf.d/includes/basic_endpoints.conf
rename to docker/etc-api-gateway/conf.d/includes/basic_endpoints.conf
diff --git a/conf.d/managed_endpoints.conf b/docker/etc-api-gateway/conf.d/managed_endpoints.conf
similarity index 100%
rename from conf.d/managed_endpoints.conf
rename to docker/etc-api-gateway/conf.d/managed_endpoints.conf
diff --git a/conf.d/management_apis.conf b/docker/etc-api-gateway/conf.d/management_apis.conf
similarity index 100%
rename from conf.d/management_apis.conf
rename to docker/etc-api-gateway/conf.d/management_apis.conf
diff --git a/naxsi_core.rules b/docker/etc-api-gateway/naxsi_core.rules
similarity index 100%
rename from naxsi_core.rules
rename to docker/etc-api-gateway/naxsi_core.rules
diff --git a/scripts/lua/api_gateway_init.lua b/docker/etc-api-gateway/scripts/lua/api_gateway_init.lua
similarity index 100%
rename from scripts/lua/api_gateway_init.lua
rename to docker/etc-api-gateway/scripts/lua/api_gateway_init.lua
diff --git a/scripts/lua/cors.lua b/docker/etc-api-gateway/scripts/lua/cors.lua
similarity index 100%
rename from scripts/lua/cors.lua
rename to docker/etc-api-gateway/scripts/lua/cors.lua
diff --git a/scripts/lua/lib/dataStore.lua b/docker/etc-api-gateway/scripts/lua/lib/dataStore.lua
similarity index 100%
rename from scripts/lua/lib/dataStore.lua
rename to docker/etc-api-gateway/scripts/lua/lib/dataStore.lua
diff --git a/scripts/lua/lib/logger.lua b/docker/etc-api-gateway/scripts/lua/lib/logger.lua
similarity index 100%
rename from scripts/lua/lib/logger.lua
rename to docker/etc-api-gateway/scripts/lua/lib/logger.lua
diff --git a/scripts/lua/lib/redis.lua b/docker/etc-api-gateway/scripts/lua/lib/redis.lua
similarity index 100%
rename from scripts/lua/lib/redis.lua
rename to docker/etc-api-gateway/scripts/lua/lib/redis.lua
diff --git a/scripts/lua/lib/request.lua b/docker/etc-api-gateway/scripts/lua/lib/request.lua
similarity index 100%
rename from scripts/lua/lib/request.lua
rename to docker/etc-api-gateway/scripts/lua/lib/request.lua
diff --git a/scripts/lua/lib/utils.lua b/docker/etc-api-gateway/scripts/lua/lib/utils.lua
similarity index 100%
rename from scripts/lua/lib/utils.lua
rename to docker/etc-api-gateway/scripts/lua/lib/utils.lua
diff --git a/scripts/lua/management/lib/apis.lua b/docker/etc-api-gateway/scripts/lua/management/lib/apis.lua
similarity index 100%
rename from scripts/lua/management/lib/apis.lua
rename to docker/etc-api-gateway/scripts/lua/management/lib/apis.lua
diff --git a/scripts/lua/management/lib/resources.lua b/docker/etc-api-gateway/scripts/lua/management/lib/resources.lua
similarity index 100%
rename from scripts/lua/management/lib/resources.lua
rename to docker/etc-api-gateway/scripts/lua/management/lib/resources.lua
diff --git a/scripts/lua/management/lib/subscriptions.lua b/docker/etc-api-gateway/scripts/lua/management/lib/subscriptions.lua
similarity index 100%
rename from scripts/lua/management/lib/subscriptions.lua
rename to docker/etc-api-gateway/scripts/lua/management/lib/subscriptions.lua
diff --git a/scripts/lua/management/lib/swagger.lua b/docker/etc-api-gateway/scripts/lua/management/lib/swagger.lua
similarity index 100%
rename from scripts/lua/management/lib/swagger.lua
rename to docker/etc-api-gateway/scripts/lua/management/lib/swagger.lua
diff --git a/scripts/lua/management/lib/tenants.lua b/docker/etc-api-gateway/scripts/lua/management/lib/tenants.lua
similarity index 100%
rename from scripts/lua/management/lib/tenants.lua
rename to docker/etc-api-gateway/scripts/lua/management/lib/tenants.lua
diff --git a/scripts/lua/management/lib/validation.lua b/docker/etc-api-gateway/scripts/lua/management/lib/validation.lua
similarity index 100%
rename from scripts/lua/management/lib/validation.lua
rename to docker/etc-api-gateway/scripts/lua/management/lib/validation.lua
diff --git a/scripts/lua/management/routes/apis.lua b/docker/etc-api-gateway/scripts/lua/management/routes/apis.lua
similarity index 100%
rename from scripts/lua/management/routes/apis.lua
rename to docker/etc-api-gateway/scripts/lua/management/routes/apis.lua
diff --git a/scripts/lua/management/routes/subscriptions.lua b/docker/etc-api-gateway/scripts/lua/management/routes/subscriptions.lua
similarity index 100%
rename from scripts/lua/management/routes/subscriptions.lua
rename to docker/etc-api-gateway/scripts/lua/management/routes/subscriptions.lua
diff --git a/scripts/lua/management/routes/tenants.lua b/docker/etc-api-gateway/scripts/lua/management/routes/tenants.lua
similarity index 100%
rename from scripts/lua/management/routes/tenants.lua
rename to docker/etc-api-gateway/scripts/lua/management/routes/tenants.lua
diff --git a/scripts/lua/oauth/appid.lua b/docker/etc-api-gateway/scripts/lua/oauth/appid.lua
similarity index 100%
rename from scripts/lua/oauth/appid.lua
rename to docker/etc-api-gateway/scripts/lua/oauth/appid.lua
diff --git a/scripts/lua/oauth/facebook.lua b/docker/etc-api-gateway/scripts/lua/oauth/facebook.lua
similarity index 100%
rename from scripts/lua/oauth/facebook.lua
rename to docker/etc-api-gateway/scripts/lua/oauth/facebook.lua
diff --git a/scripts/lua/oauth/github.lua b/docker/etc-api-gateway/scripts/lua/oauth/github.lua
similarity index 100%
rename from scripts/lua/oauth/github.lua
rename to docker/etc-api-gateway/scripts/lua/oauth/github.lua
diff --git a/scripts/lua/oauth/google.lua b/docker/etc-api-gateway/scripts/lua/oauth/google.lua
similarity index 100%
rename from scripts/lua/oauth/google.lua
rename to docker/etc-api-gateway/scripts/lua/oauth/google.lua
diff --git a/scripts/lua/oauth/mock.lua b/docker/etc-api-gateway/scripts/lua/oauth/mock.lua
similarity index 100%
rename from scripts/lua/oauth/mock.lua
rename to docker/etc-api-gateway/scripts/lua/oauth/mock.lua
diff --git a/scripts/lua/policies/backendRouting.lua b/docker/etc-api-gateway/scripts/lua/policies/backendRouting.lua
similarity index 100%
rename from scripts/lua/policies/backendRouting.lua
rename to docker/etc-api-gateway/scripts/lua/policies/backendRouting.lua
diff --git a/scripts/lua/policies/mapping.lua b/docker/etc-api-gateway/scripts/lua/policies/mapping.lua
similarity index 100%
rename from scripts/lua/policies/mapping.lua
rename to docker/etc-api-gateway/scripts/lua/policies/mapping.lua
diff --git a/scripts/lua/policies/rateLimit.lua b/docker/etc-api-gateway/scripts/lua/policies/rateLimit.lua
similarity index 100%
rename from scripts/lua/policies/rateLimit.lua
rename to docker/etc-api-gateway/scripts/lua/policies/rateLimit.lua
diff --git a/scripts/lua/policies/security.lua b/docker/etc-api-gateway/scripts/lua/policies/security.lua
similarity index 100%
rename from scripts/lua/policies/security.lua
rename to docker/etc-api-gateway/scripts/lua/policies/security.lua
diff --git a/scripts/lua/policies/security/apiKey.lua b/docker/etc-api-gateway/scripts/lua/policies/security/apiKey.lua
similarity index 100%
rename from scripts/lua/policies/security/apiKey.lua
rename to docker/etc-api-gateway/scripts/lua/policies/security/apiKey.lua
diff --git a/scripts/lua/policies/security/clientSecret.lua b/docker/etc-api-gateway/scripts/lua/policies/security/clientSecret.lua
similarity index 100%
rename from scripts/lua/policies/security/clientSecret.lua
rename to docker/etc-api-gateway/scripts/lua/policies/security/clientSecret.lua
diff --git a/scripts/lua/policies/security/oauth2.lua b/docker/etc-api-gateway/scripts/lua/policies/security/oauth2.lua
similarity index 100%
rename from scripts/lua/policies/security/oauth2.lua
rename to docker/etc-api-gateway/scripts/lua/policies/security/oauth2.lua
diff --git a/scripts/lua/routing.lua b/docker/etc-api-gateway/scripts/lua/routing.lua
similarity index 100%
rename from scripts/lua/routing.lua
rename to docker/etc-api-gateway/scripts/lua/routing.lua
diff --git a/init.sh b/docker/init-container.sh
similarity index 100%
rename from init.sh
rename to docker/init-container.sh
diff --git a/tools/travis/build.sh b/tools/travis/build.sh
index fe80906..583b027 100755
--- a/tools/travis/build.sh
+++ b/tools/travis/build.sh
@@ -18,10 +18,11 @@ $ANSIBLE_CMD prereq.yml
 $ANSIBLE_CMD couchdb.yml
 $ANSIBLE_CMD initdb.yml
 
-#build docker image locally 
+#build docker image locally - use Makefile
 pushd $ROOTDIR
 pwd
-docker build . -t "openwhisk/apigateway" 
+#docker build . -t "openwhisk/apigateway"
+DOCKER_TAG="openwhisk/apigateway" make docker
 popd
 
 #Use local
@@ -52,4 +53,3 @@ sleep 60
 TERM=dumb ./gradlew tests:test --tests whisk.core.apigw.* ${WSK_TESTS_DEPS_EXCLUDE}
 sleep 60
 TERM=dumb ./gradlew tests:test --tests whisk.core.cli.test.ApiGwTests ${WSK_TESTS_DEPS_EXCLUDE}
-


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services