# Copyright 2021 EMQ Technologies Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. FROM centos:7 RUN yum install -y make wget git which rpm-build gcc ARG GO_VERSION=1.15.1 RUN case $(arch) in \ x86_64) \ case $(getconf LONG_BIT) in \ 64) \ ARCH=amd64; \ yum install -y epel-release; \ yum install -y upx \ ;; \ 32) ARCH=386;; \ esac \ ;; \ aarch64) \ ARCH=arm64 \ ;; \ arm) \ ARCH=armv6l \ ;; \ ppc64le) \ ARCH=ppc64le\ ;; \ s390x) \ ARCH=s390x \ ;; \ esac \ && wget --no-verbose https://golang.org/dl/go$GO_VERSION.linux-$ARCH.tar.gz \ && tar -C /usr/local -xzf go$GO_VERSION.linux-$ARCH.tar.gz ENV PATH=$PATH:/usr/local/go/bin COPY . /go/kuiper WORKDIR /go/kuiper ENV KUIPER_SOURCE=/go/kuiper RUN make -C deploy/packages RUN .ci/test.sh