forked from red-hat-storage/ocsci-osd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_osdtest
35 lines (26 loc) · 1.14 KB
/
Dockerfile_osdtest
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
FROM registry.redhat.io/ubi8/ubi
# Based on https://catalog.redhat.com/software/containers/ubi8/python-38/5dde9cacbed8bd164a0af24a
# Configure k8s repository to install kubectl
COPY k8s.repo /etc/yum.repos.d/k8s.repo
# Python package installation.
RUN INSTALL_PKGS="python38 python38-devel python38-setuptools python38-pip \
libffi-devel libtool-ltdl enchant glibc-langpack-en redhat-rpm-config \
git gcc kubectl" && \
yum -y module enable python38:3.8 && \
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
yum -y clean all --enablerepo='*' && \
rm -rf /var/cache/yum
ADD https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz /
RUN cd /usr/local/bin && \
tar -xvf /openshift-client-linux.tar.gz oc
# Install ocs-ci inside the container
ENV OCSCI_INSTALL_DIR=/opt/ocs-ci \
CLUSTER_DIR=/opt/cluster
COPY bin/install-ocs-ci.sh /usr/local/bin/
COPY bin/test-kubectl.sh /usr/local/bin/
COPY toolbox_pod.yaml /
RUN chmod 755 /usr/local/bin/*.sh && \
chmod 644 /toolbox_pod.yaml
#RUN install-ocs-ci.sh
ENTRYPOINT [ "/usr/local/bin/test-kubectl.sh" ]