-
Notifications
You must be signed in to change notification settings - Fork 71
/
Dockerfile.ppc64le
64 lines (47 loc) · 2.45 KB
/
Dockerfile.ppc64le
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
55
56
57
58
59
60
61
62
63
64
# Container image including olm-utils
ARG CPD_OLM_UTILS_V2_IMAGE="icr.io/cpopen/cpd/olm-utils-v2:latest.ppc64le"
ARG CPD_OLM_UTILS_V3_IMAGE="icr.io/cpopen/cpd/olm-utils-v3:latest.ppc64le"
FROM ${CPD_OLM_UTILS_V2_IMAGE}
RUN cd /opt/ansible && \
tar czf /tmp/opt-ansible-v2.tar.gz *
FROM ${CPD_OLM_UTILS_V3_IMAGE}
LABEL authors="Arthur Laimbock, \
Markus Wiegleb, \
Frank Ketelaars, \
Jiri Petnik"
USER 0
# Install required packages, including HashiCorp Vault client
RUN yum install -y yum-utils && \
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
yum install -y tar sudo unzip wget jq skopeo httpd-tools git hostname bind-utils iproute procps-ng && \
yum install -y gcc python3.11-devel && \
pip3 install jmespath pyyaml argparse python-benedict pyvmomi psutil && \
curl -O https://downloads.power-devops.com/vault_1.12.4_linux_ppc64le.zip && \
unzip -d /usr/local/bin vault_1.12.4_linux_ppc64le.zip && rm vault_1.12.4_linux_ppc64le.zip && \
yum install -y nginx && \
yum clean all
RUN ansible-galaxy collection install community.crypto kubernetes.core
VOLUME ["/Data"]
# Prepare directory that runs automation scripts
RUN mkdir -p /cloud-pak-deployer && \
mkdir -p /Data && \
mkdir -p /olm-utils
COPY . /cloud-pak-deployer/
COPY ./deployer-web/nginx.conf /etc/nginx/
COPY --from=olm-utils-v2 /tmp/opt-ansible-v2.tar.gz /olm-utils/
RUN cd /opt/ansible && \
tar czf /olm-utils/opt-ansible-v3.tar.gz *
# BUG with building wheel
#RUN pip3 install -r /cloud-pak-deployer/deployer-web/requirements.txt > /tmp/deployer-web-pip-install.out 2>&1
RUN pip3 install "cython<3.0.0" wheel && pip3 install PyYAML==6.0 --no-build-isolation && pip3 install -r /cloud-pak-deployer/deployer-web/requirements.txt > /tmp/deployer-web-pip-install.out 2>&1
# cli utilities
RUN wget -q -O /tmp/cpd-cli.tar.gz $(curl -s https://api.github.com/repos/IBM/cpd-cli/releases/latest | jq -r '.assets[] | select( .browser_download_url | contains("ppc64le-EE")).browser_download_url') && \
tar -xzf /tmp/cpd-cli.tar.gz -C /usr/local/bin --strip-components=1 && \
rm -f /tmp/cpd-cli.tar.gz
ENV USER_UID=1001
RUN chown -R ${USER_ID}:0 /Data && \
chown -R ${USER_ID}:0 /cloud-pak-deployer && \
chmod -R ug+rwx /cloud-pak-deployer/docker-scripts && \
chmod ug+rwx /cloud-pak-deployer/*.sh
# USER ${USER_UID}
ENTRYPOINT ["/cloud-pak-deployer/docker-scripts/container-bash.sh"]