-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Copy pathDockerfile
54 lines (41 loc) · 1.97 KB
/
Dockerfile
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
48
49
50
51
52
53
54
FROM quay.io/centos/centos:stream9
MAINTAINER OpenShift Team <[email protected]>
USER root
LABEL name="openshift/origin-ansible" \
summary="OpenShift's installation and configuration tool" \
description="A containerized openshift-ansible image to use in CI - includes necessary packages to test clusters on AWS/GCP/Azure" \
url="https://github.com/openshift/openshift-ansible" \
io.k8s.display-name="openshift-ansible" \
io.k8s.description="A containerized openshift-ansible image to use in CI - includes necessary packages to test clusters on AWS/GCP/Azure" \
io.openshift.expose-services="" \
io.openshift.tags="openshift,install,upgrade,ansible" \
atomic.run="once"
ENV USER_UID=1001 \
HOME=/opt/app-root/src/ \
WORK_DIR=/usr/share/ansible/openshift-ansible \
OPTS="-v"
# Add image scripts and files for running as a system container
COPY images/installer/root /
# Install openshift-ansible RPMs
RUN yum install -y epel-release 'dnf-command(config-manager)' && \
yum config-manager --enable built > /dev/null && \
yum install --setopt=tsflags=nodocs -y \
python3.11 python3.11-pip python3.11-urllib3 \
openshift-ansible-test && \
yum clean all
RUN unlink /usr/bin/python3
RUN ln -s /usr/bin/python3.11 /usr/bin/python3
# Add a symlink to pip3.x.
# Any future use of pip3 can be used after this link is set, rather than specifically calling pip3.x.
RUN ln -s /usr/bin/pip3.11 /usr/bin/pip3
# for ec2_ami_info (in workers-rhel-aws-provision CI step) which requires boto3
RUN pip3 install --no-cache-dir boto3 botocore 'ansible-core<2.17'
# ansible-galaxy will not be available until ansible-core is installed
RUN ansible-galaxy collection install -p /usr/share/ansible/collections amazon.aws && \
find $HOME/.ansible -delete
RUN /usr/local/bin/user_setup \
&& rm /usr/local/bin/usage.ocp
USER ${USER_UID}
WORKDIR ${WORK_DIR}
ENTRYPOINT [ "/usr/local/bin/entrypoint" ]
CMD [ "/usr/local/bin/run" ]