-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile-csi-host-definer
51 lines (42 loc) · 1.72 KB
/
Dockerfile-csi-host-definer
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
FROM registry.access.redhat.com/ubi8/python-39:1-206.1732638092 AS builder
USER root
RUN yum update -y
RUN if [[ "$(uname -m)" != "x86"* ]]; then yum install -y rust-toolset; fi
USER default
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
WORKDIR /tmp
COPY controllers/servers/csi/requirements.txt ./csi_requirements.txt
COPY controllers/servers/host_definer/requirements.txt ./host_definer_requirements.txt
# avoid default- boringssl lib, since it does not support z systems
ENV GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True
RUN pip3 install -r ./csi_requirements.txt -r ./host_definer_requirements.txt
USER root
COPY controllers/scripts/csi_general .
RUN chmod +x csi_pb2.sh
RUN ./csi_pb2.sh
RUN pip3 install .
FROM registry.access.redhat.com/ubi8/python-39:1-206.1732638092
ARG VERSION=1.12.1
ARG BUILD_NUMBER=0
###Required Labels
LABEL name="IBM block storage CSI driver host definer" \
vendor="IBM" \
maintainer="IBM Storage" \
version=$VERSION \
release=$BUILD_NUMBER \
summary="The host definer defines Kubernetes nodes on IBM block storage" \
description="The host definer defines container orchestrator nodes on IBM block storage." \
io.k8s.display-name="IBM block storage CSI driver host definer" \
io.k8s.description="The host definer defines container orchestrator nodes on IBM block storage." \
io.openshift.tags=ibm,csi,ibm-block-csi-driver,host-definer
COPY --from=builder /opt/app-root /opt/app-root
COPY ./common /driver/common
COPY ./controllers/ /driver/controllers/
COPY ./LICENSE /licenses/
COPY ./NOTICES /licenses/
WORKDIR /driver/controllers/servers/host_definer/
ENV PYTHONPATH=/driver
USER root
RUN yum update -y
USER default
CMD ["python3", "/driver/controllers/servers/host_definer/main.py"]