-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile.rhel7
47 lines (37 loc) · 2.17 KB
/
Dockerfile.rhel7
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM registry/rhel7:latest
COPY rhel7.repo ansible-el7.repo /etc/yum.repos.d/
RUN rm -f /etc/yum.repos.d/redhat.repo /var/lib/rhsm/repo_server_val/* && \
yum install -y ansible && rpm -V ansible && \
yum clean all && rm /etc/yum.repos.d/ansible-el7.repo
RUN yum update -y && \
PKGS="rsync qemu-kvm xorriso rh-git227" && \
yum install -y $PKGS && rpm -V $PKGS && \
yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm && \
PKGS="python2-fmf python3-pip" && \
yum install -y $PKGS && rpm -V $PKGS && \
yum clean all && rm /etc/yum.repos.d/rhel7.repo && \
pip3 install cachecontrol productmd PyYAML
RUN if [ ! -d /usr/share/ansible/inventory ]; then \
mkdir -p /usr/share/ansible/inventory ; \
fi ; \
curl -s -o /usr/share/ansible/inventory/standard-inventory-qcow2 \
https://pagure.io/fork/rmeggins/standard-test-roles/raw/linux-system-roles/f/inventory/standard-inventory-qcow2 && \
chmod +x /usr/share/ansible/inventory/standard-inventory-qcow2 && \
sed -i -e 's,^#!/usr/bin/python3.*$,#!/usr/bin/python2,' \
/usr/share/ansible/inventory/standard-inventory-qcow2
RUN curl -s -L -o /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64
RUN chmod +x /usr/local/bin/dumb-init
COPY test /test
# for role2collection support
RUN curl -s -o /test/lsr_role2collection.py \
https://raw.githubusercontent.com/linux-system-roles/auto-maintenance/master/lsr_role2collection.py
RUN curl -s -o /test/runtime.yml \
https://raw.githubusercontent.com/linux-system-roles/auto-maintenance/master/lsr_role2collection/runtime.yml
RUN curl -s -o /test/runqemu.py \
https://raw.githubusercontent.com/linux-system-roles/tox-lsr/main/src/tox_lsr/test_scripts/runqemu.py
ENV COLLECTION_SRC_OWNER=linux-system-roles COLLECTION_META_RUNTIME=/test/runtime.yml \
ANSIBLE_STDOUT_CALLBACK=debug ANSIBLE_CALLBACK_WHITELIST=profile_tasks \
TEST_HARNESS_SKIP_TAGS=tests::nvme,tests::infiniband TEST_SKIP_MISSING_DEVICE=true
VOLUME /config /secrets /cache
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD ["scl", "enable", "rh-git227", "/test/run-tests"]