apache-ignite

Форк
0
99 строк · 4.5 Кб
1
# Licensed to the Apache Software Foundation (ASF) under one or more
2
# contributor license agreements.  See the NOTICE file distributed with
3
# this work for additional information regarding copyright ownership.
4
# The ASF licenses this file to You under the Apache License, Version 2.0
5
# (the "License"); you may not use this file except in compliance with
6
# the License.  You may obtain a copy of the License at
7
#
8
#    http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15

16
ARG jdk_version=openjdk:8
17
FROM $jdk_version
18

19
MAINTAINER Apache Ignite dev@ignite.apache.org
20
VOLUME ["/opt/ignite-dev"]
21

22
# Set the timezone.
23
ENV TZ=Europe/Moscow
24
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
25

26
# Do not ask for confirmations when running apt-get, etc.
27
ENV DEBIAN_FRONTEND noninteractive
28

29
# Set the ducker.creator label so that we know that this is a ducker image.  This will make it
30
# visible to 'ducker purge'.  The ducker.creator label also lets us know what UNIX user built this
31
# image.
32
ARG ducker_creator=default
33
LABEL ducker.creator=$ducker_creator
34

35
# Update Linux and install necessary utilities.
36
RUN cat /etc/apt/sources.list | sed 's/http:\/\/deb.debian.org/https:\/\/deb.debian.org/g' > /etc/apt/sources.list.2 && mv /etc/apt/sources.list.2 /etc/apt/sources.list
37
RUN apt update && apt install -y sudo netcat iptables rsync unzip wget curl jq coreutils openssh-server net-tools vim python3-pip python3-dev libffi-dev libssl-dev cmake pkg-config libfuse-dev iperf traceroute mc && apt-get -y clean
38
RUN python3 -m pip install -U pip==20.2.2;
39
COPY ./requirements.txt /root/requirements.txt
40
RUN pip3 install -r /root/requirements.txt
41

42
# Set up ssh
43
COPY ./ssh-config /root/.ssh/config
44
# NOTE: The paramiko library supports the PEM-format private key, but does not support the RFC4716 format.
45
RUN ssh-keygen -m PEM -q -t rsa -N '' -f /root/.ssh/id_rsa && cp -f /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
46
RUN echo 'PermitUserEnvironment yes' >> /etc/ssh/sshd_config
47

48
ARG APACHE_MIRROR="https://apache-mirror.rbc.ru/pub/apache/"
49
ARG APACHE_ARCHIVE="https://archive.apache.org/dist/"
50

51
# Install binary test dependencies.
52
RUN for v in "2.7.6" "2.15.0"; \
53
    do cd /opt; \
54
    curl -O $APACHE_ARCHIVE/ignite/$v/apache-ignite-$v-bin.zip;\
55
    unzip apache-ignite-$v-bin.zip && mv /opt/apache-ignite-$v-bin /opt/ignite-$v;\
56
    done
57

58
RUN rm /opt/apache-ignite-*-bin.zip
59

60
#Install zookeeper.
61
ARG ZOOKEEPER_VERSION="3.5.8"
62
ARG ZOOKEEPER_NAME="zookeeper-$ZOOKEEPER_VERSION"
63
ARG ZOOKEEPER_RELEASE_NAME="apache-$ZOOKEEPER_NAME-bin"
64
ARG ZOOKEEPER_RELEASE_ARTIFACT="$ZOOKEEPER_RELEASE_NAME.tar.gz"
65
RUN echo $APACHE_ARCHIVE/zookeeper/$ZOOKEEPER_NAME/$ZOOKEEPER_RELEASE_ARTIFACT
66
RUN cd /opt && curl -O $APACHE_ARCHIVE/zookeeper/$ZOOKEEPER_NAME/$ZOOKEEPER_RELEASE_ARTIFACT \
67
 && tar xvf $ZOOKEEPER_RELEASE_ARTIFACT && rm $ZOOKEEPER_RELEASE_ARTIFACT
68
RUN mv /opt/$ZOOKEEPER_RELEASE_NAME /opt/$ZOOKEEPER_NAME
69

70
# The version of Kibosh to use for testing.
71
# If you update this, also update vagrant/base.sh
72
ARG KIBOSH_VERSION="8841dd392e6fbf02986e2fb1f1ebf04df344b65a"
73

74
# Install Kibosh
75
RUN apt-get install fuse
76
RUN cd /opt && git clone -q  https://github.com/confluentinc/kibosh.git && cd "/opt/kibosh" && git reset --hard $KIBOSH_VERSION && mkdir "/opt/kibosh/build" && cd "/opt/kibosh/build" && ../configure && make -j 2
77

78
#Install jmxterm
79
ARG JMXTERM_NAME="jmxterm"
80
ARG JMXTERM_VERSION="1.0.1"
81
ARG JMXTERM_ARTIFACT="$JMXTERM_NAME-$JMXTERM_VERSION-uber.jar"
82
RUN cd /opt && curl -OL https://github.com/jiaqi/jmxterm/releases/download/v$JMXTERM_VERSION/$JMXTERM_ARTIFACT \
83
       && mv $JMXTERM_ARTIFACT $JMXTERM_NAME.jar
84

85
# Set up the ducker user.
86
RUN useradd -ms /bin/bash ducker \
87
    && mkdir -p /home/ducker/ \
88
    && rsync -aiq /root/.ssh/ /home/ducker/.ssh \
89
    && chown -R ducker /home/ducker/ /mnt/ /var/log/ /opt \
90
    && echo "LANG=C.UTF-8" >> /home/ducker/.ssh/environment \
91
    && echo "PATH=$(runuser -l ducker -c 'echo $PATH'):$JAVA_HOME/bin" >> /home/ducker/.ssh/environment \
92
    && echo 'PATH=$PATH:'"$JAVA_HOME/bin" >> /home/ducker/.profile \
93
    && echo 'ducker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
94
USER ducker
95

96
CMD sudo service ssh start && tail -f /dev/null
97

98
# Container port exposure
99
EXPOSE 11211 47100 47500 49112 10800 8080 2888 3888 2181 1098 8082
100

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.