Skip to content

Commit abfbe65

Browse files
authored
Merge pull request #89 from yselkowitz/enable-ibm-p-z
Use nfs-ganesha as base for container image
2 parents 6a75b06 + 8c2ee51 commit abfbe65

File tree

1 file changed

+2
-83
lines changed

1 file changed

+2
-83
lines changed

deploy/docker/Dockerfile

Lines changed: 2 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -12,96 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Modified from https://github.com/rootfs/nfs-ganesha-docker by Huamin Chen
16-
#
17-
# NOTE: This Dockerfile is maintained to support being built both on amd64 and
18-
# arm64 architectures.
19-
#
20-
# List of Fedora versions: https://en.wikipedia.org/wiki/Fedora_version_history#Version_history
21-
ARG FEDORA_VERSION=35
22-
23-
24-
25-
FROM registry.fedoraproject.org/fedora:${FEDORA_VERSION} AS build
26-
27-
# Build ganesha from source, install it to /usr/local and a use multi stage build to have a smaller image
28-
# Set NFS_V4_RECOV_ROOT to /export
29-
30-
# Install dependencies on separated lines to be easier to track changes using git blame
31-
RUN dnf install -y \
32-
bison \
33-
cmake \
34-
dbus-devel \
35-
flex \
36-
tar \
37-
gcc \
38-
gcc-c++ \
39-
git \
40-
jemalloc-devel \
41-
krb5-devel \
42-
libblkid-devel \
43-
libnfsidmap-devel \
44-
libnsl2-devel \
45-
libntirpc-devel \
46-
libuuid-devel \
47-
ninja-build \
48-
patch \
49-
userspace-rcu-devel \
50-
xfsprogs-devel
51-
52-
# Clone specific version of ganesha
15+
# Update only after new version of deploy/base/Dockerfile change has built
5316
ARG GANESHA_VERSION=V3.5
54-
RUN git clone --branch ${GANESHA_VERSION} --recurse-submodules https://github.com/nfs-ganesha/nfs-ganesha
55-
WORKDIR /nfs-ganesha
56-
RUN mkdir -p /usr/local \
57-
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \
58-
-DBUILD_CONFIG=vfs_only -DUSE_FSAL_GLUSTER=OFF -DUSE_FSAL_RGW=OFF \
59-
-DUSE_RADOS_RECOV=OFF -DRADOS_URLS=OFF -DUSE_SYSTEM_NTIRPC=ON \
60-
-G Ninja src/ \
61-
&& sed -i 's|@SYSSTATEDIR@/lib/nfs/ganesha|/export|' src/include/config-h.in.cmake \
62-
&& ninja \
63-
&& ninja install
64-
RUN mkdir -p /ganesha-extra \
65-
&& mkdir -p /ganesha-extra/etc/dbus-1/system.d \
66-
&& cp src/scripts/ganeshactl/org.ganesha.nfsd.conf /ganesha-extra/etc/dbus-1/system.d/
6717

6818

69-
70-
FROM registry.fedoraproject.org/fedora-minimal:${FEDORA_VERSION} AS run
71-
72-
# Install dependencies on separated lines to be easier to track changes using git blame
73-
RUN microdnf install -y \
74-
dbus-x11 \
75-
hostname \
76-
jemalloc \
77-
libblkid \
78-
libnfsidmap \
79-
libntirpc \
80-
libuuid \
81-
nfs-utils \
82-
rpcbind \
83-
userspace-rcu \
84-
xfsprogs \
85-
&& microdnf clean all
86-
87-
RUN mkdir -p /var/run/dbus \
88-
&& mkdir -p /export
89-
90-
# add libs from /usr/local/lib64
91-
RUN echo /usr/local/lib64 > /etc/ld.so.conf.d/local_libs.conf
92-
93-
# do not ask systemd for user IDs or groups (slows down dbus-daemon start)
94-
RUN sed -i s/systemd// /etc/nsswitch.conf
95-
96-
COPY --from=build /usr/local /usr/local/
97-
COPY --from=build /ganesha-extra /
19+
FROM ghcr.io/kubernetes-sigs/nfs-ganesha:${GANESHA_VERSION}
9820

9921
ARG binary=nfs-provisioner
10022
COPY ${binary} /nfs-provisioner
10123

102-
# run ldconfig after libs have been copied
103-
RUN ldconfig
104-
10524
# expose mountd 20048/tcp and nfsd 2049/tcp and rpcbind 111/tcp 111/udp
10625
EXPOSE 2049/tcp 20048/tcp 111/tcp 111/udp
10726

0 commit comments

Comments
 (0)