user3795582
user3795582

Reputation: 31

NFS server into a docker container

I'm trying to run NFS server into a docker container. I used this container :

https://github.com/cpuguy83/docker-nfs-server

But I can't mount the directory. I tried to give an ip adresss to my contaner with ifconfig vethaa1d6f9 172.xx.xx.xxx and I can ping this adress but it's impossible to mount a directory with

mount -t nfs 172.xx.xx.xxx:/Path

Do you have any Ideas how can I mount my directory and access to my container ?

Upvotes: 1

Views: 3436

Answers (1)

user3795582
user3795582

Reputation: 31

I've found a way to get the ip of a docker container :

 docker inspect nfs22 | grep IP

And now I can mount my directory with mount -t nfs IP:/Path

I hope this will help you !

Upvotes: 1

Related Questions