forked from openshift/assisted-ignition-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.assisted-ignition-generator
48 lines (37 loc) · 1.55 KB
/
Dockerfile.assisted-ignition-generator
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
# [TODO] - remove this line, once we are ready to use openshift-installer from the release
FROM quay.io/ocpmetal/openshift-installer
# [TODO] - add someway to get oc client in order to use it to extract openshift-baremetal-install executable
# FROM quay.io/yshnaidm/oc-image:latest
FROM quay.io/ocpmetal/assisted-service:latest AS inventory
FROM centos:8
RUN dnf install -y libvirt-libs python3 findutils wget && \
yum clean all && \
rm -rf /var/cache/yum
COPY requirements.txt /tmp/requirements.txt
COPY --from=inventory /clients/assisted-service-client-*.tar.gz /build/pip/
RUN pip3 install -r /tmp/requirements.txt
RUN pip3 install ipython
RUN pip3 install /build/pip/*
RUN rm /tmp/*requirements.txt
ARG WORK_DIR=/data
ARG TAR_DIR=/tar
ARG CLIENT_PACKAGE_LOCATION=https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest
ARG CLIENT_PACKAGE_NAME=openshift-client-linux.tar.gz
RUN mkdir $WORK_DIR
RUN chmod 777 $WORK_DIR
RUN mkdir $TAR_DIR
RUN wget --directory-prefix=$TAR_DIR $CLIENT_PACKAGE_LOCATION/$CLIENT_PACKAGE_NAME
RUN tar -C $TAR_DIR -xvzf $TAR_DIR/$CLIENT_PACKAGE_NAME
RUN mkdir /root/.docker
# [TODO] - change this line to use openshift-installer from the release, once we are ready
COPY --from=0 /root/installer/openshift-install $WORK_DIR
RUN cp $TAR_DIR/oc $WORK_DIR/oc
#COPY --from=0 /root/oc/oc $WORK_DIR
COPY ./render_files.py $WORK_DIR
COPY ./utils.py $WORK_DIR
COPY ./bmh_utils.py $WORK_DIR
COPY ./oc_utils.py $WORK_DIR
COPY ./test_utils.py $WORK_DIR
ENV WORK_DIR=$WORK_DIR
ENV EXEC_PATH=$WORK_DIR/render_files.py
ENTRYPOINT python3 $EXEC_PATH