-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile-csi-controller
70 lines (57 loc) · 2.35 KB
/
Dockerfile-csi-controller
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright IBM Corporation 2024.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM registry.access.redhat.com/ubi8/python-39:1-206.1732638092 AS builder
USER root
RUN if [[ "$(uname -m)" != "x86"* ]]; then yum install -y rust-toolset; fi
RUN yum update -y
USER default
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
WORKDIR /tmp
COPY controllers/servers/csi/requirements.txt .
# avoid default boringssl lib, since it does not support z systems
ENV GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True
RUN pip3 install -r ./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
MAINTAINER IBM Storage
ARG VERSION=1.12.1
ARG BUILD_NUMBER=0
###Required Labels
LABEL name="IBM block storage CSI driver controller" \
vendor="IBM" \
version=$VERSION \
release=$BUILD_NUMBER \
summary="The controller component of the IBM block storage CSI driver" \
description="The IBM block storage CSI driver enables container orchestrators, such as Kubernetes and OpenShift, to manage the life-cycle of persistent storage." \
io.k8s.display-name="IBM block storage CSI driver controller" \
io.k8s.description="The IBM block storage CSI driver enables container orchestrators, such as Kubernetes and OpenShift, to manage the life-cycle of persistent storage." \
io.openshift.tags=ibm,csi,ibm-block-csi-driver,ibm-block-csi-node
COPY --from=builder /opt/app-root /opt/app-root
COPY ./common /driver/common
COPY ./controllers/ /driver/controllers/
COPY ./LICENSE /licenses/
COPY ./NOTICES /licenses/
USER root
RUN chmod +x /driver/controllers/scripts/entrypoint.sh
USER default
WORKDIR /driver
ENV PYTHONPATH=/driver
USER root
RUN yum update -y
USER default
# Note: UBI runs with app-user by default.
ENTRYPOINT ["/driver/controllers/scripts/entrypoint.sh"]