Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

nfs-ganesha service Dockerfile

I want to learn more ablout nfs-ganesha service with docker, could you provide me the Dockerfile of nfs-ganesha?

By the way, it's not docker, it's podman.Thank you

Do you want to know more how we package the container image using Dokerfile, or do you need info on the operation of the service itself and setting up active/active NFS ?

Thanks for your quick reply!
As you said, I want to learn more about "how you package the container image using Dokerfile". Could you provide me the Dockerfile and I want to learn more and make a docker image about nfs-ganesha by myself!
Thank you!

This is the Dokerfile

echo "FROM ubuntu:18.04
COPY image-root /
RUN apt-get update && \
dpkg -iR /root/debs; apt-get install -f -y --no-install-recommends; \
apt-get clean && \
rm -f /var/lib/apt/lists/*; rm -rf /root/debs
" > Dockerfile

note: /root/debs contains the builds for Ceph and Ganesha, they also contain a couple of bash scripts we use to control the service, you can view them in the images.

That's open hand and open source at it's best! Cheers to y'all at PetaSAN.

Thanks 🙂

Thanks for you help!

 

Dear All:

As Dockerfile describes, 'rm -f /var/lib/apt/lists/*; rm -rf /root/debs', So I can't see the deb package information under/root/debs correctly in Images!

Another, I also want to learn more about " need info on the operation of the service itself and setting up active/active NFS".Is it convenient to open nfs and its dependent source code?

BR

You can run dpkg -l to get info on installed debs, dpkg -L to list the installed files, dpkg-repack to repack them..etc. the debs are the build of Ceph and Ganesha sources.

In docker file, after installing the debs we delete them + delete current apt repository database (from apt update) to reduce space. It is common to trim your container images to make them small. The PetaSAN nfs container is around 40 MB in size, it is quite amazing if you consider this also includes the core Ubuntu image.

Going into Ceph and Ganesha sources is an open ended thing, i suggest you first look at the Ceph  plugin for Ganesha and its design, suggested:

https://www.youtube.com/watch?v=CWDcr0qNqoU

 http://www.nfsv4bat.org/Documents/BakeAThon/2018/Active_Active%20NFS%20Server%20Recovery.pdf

https://github.com/nfs-ganesha/nfs-ganesha/tree/next/src/FSAL/FSAL_CEPH

Good luck..