# See the License for the specific language governing permissions and
# limitations under the License.
#
-FROM golang:1.13.8 AS build-env
+FROM golang:1.16 AS build-env
+
+ARG INGRESS_VERSION=1.4.0
+ARG ENABLE_PROXY=false
-ARG INGRESS_VERSION=1.3.0
LABEL ingress_version="${INGRESS_VERSION}"
RUN rm -rf /etc/localtime \
&& ln -s /usr/share/zoneinfo/Hongkong /etc/localtime \
&& tar zxvf ${INGRESS_VERSION}.tar.gz \
&& ln -s apisix-ingress-controller-${INGRESS_VERSION} controller \
&& cd ./controller \
- && GOPROXY=https://goproxy.io,direct make build
+ && if [ "$ENABLE_PROXY" = "true" ] ; then go env -w GOPROXY=https://goproxy.cn,direct ; fi \
+ && make build
FROM alpine:3.13.5