| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You 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 eclipse-temurin:8-jdk-centos7 |
| |
| ENV LANG C.UTF-8 |
| |
| WORKDIR /root |
| COPY code_run.sh /root/code_run.sh |
| RUN wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz |
| RUN chmod 755 /root/code_run.sh |
| RUN tar -xvf /root/apache-maven-3.8.8-bin.tar.gz -C /opt/ |
| |
| RUN yum install unzip curl git epel-release gettext jq wget psmisc -y |
| RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" |
| RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl |
| RUN curl -fsSl https://kubevela.net/script/install.sh | bash |
| |
| RUN wget -O go1.19.linux-amd64.tar.gz -q https://go.dev/dl/go1.19.linux-amd64.tar.gz && \ |
| tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz && \ |
| rm go1.19.linux-amd64.tar.gz |
| |
| RUN echo "export GOROOT=/usr/local/go" >> /root/.bashrc && \ |
| echo "export PATH=\$GOROOT/bin:\$PATH" >> /root/.bashrc && \ |
| echo "export GOPATH=/home/admin/code" >> /root/.bashrc && \ |
| echo "export GOPROXY=https://proxy.golang.com.cn,direct" >> /root/.bashrc && \ |
| echo "export GO111MODULE=on" >> /root/.bashrc && \ |
| echo "export GOSUMDB=off" >> /root/.bashrc && \ |
| echo "export GONOSUMDB=*.corp.example.com,rsc.io/private" >> /root/.bashrc && \ |
| source /root/.bashrc |
| |
| RUN yum install -y centos-release-scl && \ |
| yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ |
| |
| RUN echo "source /opt/rh/devtoolset-7/enable" >> /root/.bashrc && \ |
| source /root/.bashrc |
| |
| ENV PATH="${PATH}:/opt/rh/devtoolset-7/root/usr/bin:/usr/local/go/bin" |
| |
| RUN GO111MODULE="on" go install gotest.tools/gotestsum@latest && \ |
| ln -s /root/go/bin/gotestsum /usr/bin/gotestsum |
| |
| RUN yum -y install make && \ |
| yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel && \ |
| wget http://pasmicrosservice.oss-cn-hangzhou.aliyuncs.com/tools/Python-3.9.0.tgz && \ |
| mkdir /usr/local/python3 && \ |
| tar -zxvf Python-3.9.0.tgz && \ |
| cd Python-3.9.0 && \ |
| ./configure --prefix=/usr/local/python3 && \ |
| make && make install && \ |
| ln -s /usr/local/python3/bin/python3 /usr/bin/python3 && \ |
| ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 && \ |
| pip3 install pytest && \ |
| ln -s /usr/local/python3/bin/pytest /usr/bin/pytest && \ |
| cd - && \ |
| rm -rf Python-3.9.0.tgz |
| |
| RUN pip3 install cmake && \ |
| ln -s /usr/local/python3/bin/cmake /usr/bin/cmake |
| |
| RUN git clone https://github.com/google/googletest && \ |
| cd googletest && \ |
| cmake CMakeLists.txt && \ |
| make && \ |
| cp lib/libgtest*.a /usr/lib && \ |
| cp -a googletest/include/gtest/ /usr/include/ && \ |
| cd - && \ |
| rm -rf googletest |
| |
| RUN cd /root && \ |
| wget http://pasmicrosservice.oss-cn-hangzhou.aliyuncs.com/tools/node-v10.16.0-linux-x64.tar.xz && \ |
| xz -d node-v10.16.0-linux-x64.tar.xz && \ |
| tar -xf node-v10.16.0-linux-x64.tar && \ |
| chown -R root:root /root/node-v10.16.0-linux-x64 && \ |
| cd node-v10.16.0-linux-x64/bin && \ |
| ln -s /root/node-v10.16.0-linux-x64/bin/node /usr/local/bin/node && \ |
| ln -s /root/node-v10.16.0-linux-x64/bin/npm /usr/local/bin/npm && \ |
| rm -rf node-v10.16.0-linux-x64.tar && \ |
| cd - |
| |
| ENV PATH="${PATH}:/usr/local/bin" |
| |
| RUN npm install -g mocha-junit-reporter && \ |
| npm install -g mocha@3.5.3 && \ |
| ln -s /root/node-v10.16.0-linux-x64/bin/mocha /bin/mocha |
| |
| RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm && \ |
| yum install -y dotnet-sdk-3.1 |
| |
| RUN echo "export PYTHONPATH=$PYTHONPATH:/root/code/" >> /root/.bashrc |
| |
| WORKDIR /root |
| CMD ["/bin/bash", "-c", "./code_run.sh"] |