forked from openshift/assisted-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.assisted-service-onprem
41 lines (32 loc) · 1.41 KB
/
Dockerfile.assisted-service-onprem
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
FROM quay.io/ocpmetal/assisted-service:latest AS assisted-service
FROM quay.io/ocpmetal/assisted-iso-create:latest AS assisted-iso-create
FROM quay.io/ocpmetal/assisted-ignition-generator:latest AS config-gen
FROM centos:8
ARG GIT_REVISION
ARG WORK_DIR=/data
ARG USER=assisted-installer
ARG NAMESPACE=assisted-installer
LABEL "git_revision"=${GIT_REVISION}
RUN yum install -y libvirt-libs python3 python3-pip findutils wget && \
yum clean all && \
rm -rf /var/cache/dnf
RUN pip3 install boto3 botocore pyyaml ipython
RUN mkdir $WORK_DIR && chmod 755 $WORK_DIR
RUN useradd $USER
RUN chown $USER:$USER $WORK_DIR
# ISO
COPY --from=assisted-iso-create $WORK_DIR/coreos-installer $WORK_DIR
COPY --from=assisted-iso-create $WORK_DIR/livecd.iso $WORK_DIR/livecd.iso
COPY --from=assisted-iso-create $WORK_DIR/assisted-iso-create $WORK_DIR
ENV COREOS_IMAGE=$WORK_DIR/livecd.iso
# install config
# [TODO] - change this line to use openshift-installer from the release, once we are ready
COPY --from=config-gen $WORK_DIR/openshift-install $WORK_DIR
COPY --from=config-gen $WORK_DIR/render_files.py $WORK_DIR
COPY --from=config-gen $WORK_DIR/utils.py $WORK_DIR
COPY --from=config-gen $WORK_DIR/bmh_utils.py $WORK_DIR
COPY --from=config-gen $WORK_DIR/oc_utils.py $WORK_DIR
COPY --from=config-gen $WORK_DIR/test_utils.py $WORK_DIR
ENV WORK_DIR=$WORK_DIR
COPY --from=assisted-service /assisted-service /assisted-service
CMD ["/assisted-service"]