feat: update to golang 1.16 (#5) main
authorkv <gxthrj@163.com>
Tue, 4 Jan 2022 02:43:37 +0000 (10:43 +0800)
committerGitHub <noreply@github.com>
Tue, 4 Jan 2022 02:43:37 +0000 (10:43 +0800)
Dockerfile

index 1641ee6bfaa2e0c6b79d94c0bd9a23e159a1a2a0..9df48110d831fe9f3d75ac42c9d4b8a8d6551c78 100644 (file)
 # 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 \
@@ -27,7 +29,8 @@ RUN wget https://github.com/apache/apisix-ingress-controller/archive/${INGRESS_V
     && 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