forked from kubernetes-sigs/aws-efs-csi-driver
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile.openshift
More file actions
23 lines (20 loc) · 1.43 KB
/
Dockerfile.openshift
File metadata and controls
23 lines (20 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder
WORKDIR /go/src/github.com/kubernetes-sigs/aws-efs-csi-driver
COPY . .
RUN make bin/aws-efs-csi-driver
# Use a base image with aws-efs-utils installed
FROM registry.ci.openshift.org/ocp/4.22:aws-efs-utils-base
# From the upstream Dockerfile:
# At image build time, static files installed by efs-utils in the config directory, i.e. CAs file, need
# to be saved in another place so that the other stateful files created at runtime, i.e. private key for
# client certificate, in the same config directory can be persisted to host with a host path volume.
# Otherwise creating a host path volume for that directory will clean up everything inside at the first time.
# Those static files need to be copied back to the config directory when the driver starts up.
#
# However in order to use a read-only root filesystem for the driver container
# while still being able to write to /etc the static files need to be moved out
# of /etc in order to be able to remount /etc with r/w emptyDir, since the
# driver needs to create symlinks there.
RUN mkdir -p /usr/share/aws-efs-csi-driver && mv /etc/amazon/efs /usr/share/aws-efs-csi-driver/efs-static-files
COPY --from=builder /go/src/github.com/kubernetes-sigs/aws-efs-csi-driver/bin/aws-efs-csi-driver /usr/bin/
ENTRYPOINT ["/usr/bin/aws-efs-csi-driver", "--efs-utils-static-files-path=/usr/share/aws-efs-csi-driver/efs-static-files"]