summaryrefslogtreecommitdiffstats
path: root/test_container/Dockerfile
blob: c099d31ba5f62c8b248aac98aabd2a8365726e8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM opensuse/leap:15.5
MAINTAINER Xin Liang <XLiang@suse.com>

CMD ["/usr/lib/systemd/systemd", "--system"]

RUN zypper refresh && \
    zypper -n install systemd \
        make autoconf automake vim which libxslt-tools mailx iproute2 iputils bzip2 openssh tar file glibc-locale-base firewalld libopenssl1_1 dos2unix iptables \
        python3 python3-pip python3-lxml python3-python-dateutil python3-setuptools python3-PyYAML python3-curses python3-behave \
        csync2 libglue-devel corosync corosync-qdevice pacemaker booth corosync-qnetd
RUN zypper --non-interactive up zypper && \
    zypper ar -f -G https://download.opensuse.org/repositories/network:/ha-clustering:/Factory/SLE_15_SP4 repo_nhf && \
    zypper --non-interactive refresh && \
    zypper --non-interactive up --allow-vendor-change -y resource-agents libqb100 pacemaker

RUN ssh-keygen -t rsa -f /root/.ssh/id_rsa -N '' && \
    cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
    chmod 0600 /root/.ssh/authorized_keys


RUN python3 -m pip install coverage

RUN mkdir -p /var/log/crmsh

COPY behave_agent.py /opt
COPY behave-agent.socket /etc/systemd/system
COPY behave-agent@.service /etc/systemd/system
RUN systemctl enable behave-agent.socket