I’m trying to install a container containing the latest version of Ganesha NFS. I’ve written a compose file with a little help from Google’s AI, which looks like this:
version: '3.8'
services:
nfs-ganesha:
image: longhornio/nfs-ganesha
container_name: nfs-server
privileged: true
ports:
- "111:111" # rpcbind
- "2049:2049" # nfs
volumes:
- /var/data/export:/export
- /var/data/home:/home
- /var/data/root:/root
- /var/data/info:/info
# Überschreiben der Standard-Konfiguration im Container:
- ./ganesha.conf:/etc/ganesha/ganesha.conf:ro
environment:
- CLIENT_LIST="10.20.0.0/24,192.168.178.0/24"
I’ve also written a ganesha.conf file:
EXPORT
{
Export_Id = 1;
Path = /var/data/export;
Pseudo = /export;
Access_Type = RW;
Squash = No_Root_Squash;
FSAL {
Name = VFS;
}
Export_Id = 2;
Path = /var/data/home;
Pseudo = /home;
Access_Type = RW;
Squash = No_Root_Squash;
FSAL {
Name = VFS;
}
Export_Id = 3;
Path = /var/data/root;
Pseudo = /root;
Access_Type = RW;
Squash = No_Root_Squash;
FSAL {
Name = VFS;
}
Export_Id = 4;
Path = /var/data/info;
Pseudo = /info;
Access_Type = RO;
Squash = Root_Squash;
FSAL {
Name = VFS;
}
}
I’m using Docker 29.5.3 (API v. 1.54) on Ubuntu 24.04 LTS.
When trying to pull the image and run the container, everything looks fine:
mixtile@blade3n2:~$ sudo docker compose up -d
WARN[0000] /home/mixtile/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] up 8/8
✔ Image longhornio/nfs-ganesha Pulled 41.6s
✔ Container nfs-server Started 2.3s
…but I get an error message labeled FATAL in the log, and the container doesn’t appear in docker ps:
mixtile@blade3n2:~$ docker logs 71db6d797d55
Creating NFS disk image with size 1024MB ...
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.20888 s, 888 MB/s
mke2fs 1.45.4 (23-Sep-2019)
Discarding device blocks: done
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 0eab5b38-b3b2-4d5c-b04a-f65748fb4aee
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
Initializing Ganesha NFS server
==================================
export path: /data/nfs
==================================
* Writing configuration
/opt/start_nfs.sh: line 64: /etc/ganesha/ganesha.conf: Read-only file system
So is it impossible to replace a config file, which comes with the image, with a new one?