-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
47 lines (41 loc) · 1.35 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
FROM centos:7
RUN yum install -y --setopt=skip_missing_names_on_install=False \
epel-release \
&& \
yum install -y --setopt=skip_missing_names_on_install=False \
bash \
gcc \
git \
make \
openssl-devel \
python36 \
python36-devel \
python36-pip \
&& \
yum update -y && \
yum clean all && \
rm -rf /var/cache/yum
#-- Set up the workload script
COPY requirements.txt /
RUN pip3 install --upgrade -r requirements.txt
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.1.7/openshift-client-linux-4.1.7.tar.gz | tar xvzf -
COPY *.py oc_in_cluster.sh /
RUN chmod a+r /*.py && \
chmod a+rx /oc_in_cluster.sh
ENTRYPOINT ["python3", "/workload_runner.py"]
RUN mkdir -p /logs && chmod 777 /logs
VOLUME /logs
#-- Run as a non-root user
RUN useradd runner
USER runner:runner
ARG builddate="(unknown)"
ARG version="(unknown)"
LABEL org.label-schema.build-date="${builddate}"
LABEL org.label-schema.description="ocs-monkey workload simulator"
LABEL org.label-schema.license="AGPL-3.0"
LABEL org.label-schema.name="ocs-monkey-generator"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.vcs-ref="${version}"
LABEL org.label-schema.vcs-url="https://github.com/red-hat-storage/ocs-monkey"
LABEL org.label-schema.vendor="OCS QE"
LABEL org.label-schema.version="${version}"