mount NFS on docker

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

mount NFS on docker

Roshan
This post was updated on .
Hello Erman,

I would like to mount an NFS filesystem on docker. The filesystem will contain goldengate trail  files and docker will host Striim.

I used the command below but gg NFS is not mouting.

docker run -d -p 9080:9080 -e "STRIIM_ACCEPT_EULA=Y" -e FIRST_NAME=Nax-e LAST_NAME=Doo -e COMPANY_NAME=MT -e COMPANY_EMAIL_ADDRESS=wdsd.telecom.mu -v /data/striim:/opt/striim --mount source=cbsogg,target=/opt/striim/cbsogg  striim/evalversion.

Kindly help me.

Thanks,

Roshan
Reply | Threaded
Open this post in threaded view
|

Re: mount NFS on docker

ErmanArslansOracleBlog
Administrator
hi Roshan,

What error does docker command produce?
Reply | Threaded
Open this post in threaded view
|

Re: mount NFS on docker

Roshan
Hi,

the content of 'cbsogg' does not appear on the docker path '/opt/striim/cbsogg'.
Reply | Threaded
Open this post in threaded view
|

Re: mount NFS on docker

ErmanArslansOracleBlog
Administrator
I can not understate your full state here..

You are specifying the cbsogg as the NFS share right?

Did you create the volume with docker?

for instance ->


 /etc/exports
/media -alldirs -ro -network=192.166.66.0 -mask=255.255.255.0

Create a new volume:
$ docker volume create --driver local --opt type=nfs --opt o=addr=192.168.66.1,rw,vers=3 --opt device=:/media nfs_erm


Try to mount the volume inside a container:
$ docker run -it --mount source=nfs_erm,target=/mnt debian /bin/bash
Reply | Threaded
Open this post in threaded view
|

Re: mount NFS on docker

Roshan
Yes, cbsogg as the NFS share.

fstab entry:
10.215.227.28:/ogg /ogg nfs rw,nfsvers=3,soft,nosuid,nolock,rsize=32768,wsize=65536,noatime 0 0

please advise on /etc/exports
/media -alldirs -ro -network=10.215.227.28 -mask=255.255.255.0


Create a new volume:
$ docker volume create --driver local --opt type=nfs --opt o=addr=10.215.227.28,rw,vers=3 --opt device=:/ogg ogg


Try to mount the volume inside a container:
$ docker run -it --mount source=ogg,target=/mnt debian /bin/bash
Reply | Threaded
Open this post in threaded view
|

Re: mount NFS on docker

ErmanArslansOracleBlog
Administrator
Reply | Threaded
Open this post in threaded view
|

Re: mount NFS on docker

Roshan
Thanks.

I created the volume, but mount fails with error below

[root@rb-nwcloudera-1 admin]# docker run -it c0dcd9368a1b --mount source=nfs_cdr,target=/mnt debian /bin/bash
Unable to find image 'c0dcd9368a1b:latest' locally

[root@rb-nwcloudera-1 admin]# docker image list
REPOSITORY              TAG            IMAGE ID       CREATED         SIZE
striimo                 latest         99b01cdd39b1   4 days ago      7.52GB
striimor                latest         e1af17195bba   11 days ago     3.07GB
striimorig1             latest         8004ee4eb925   11 days ago     4.14GB
striimorig              latest         11feffafd51f   11 days ago     3.03GB
striimtest1             latest         c38c45a25647   11 days ago     4.14GB
striimtest              latest         0722cf0be990   11 days ago     4.14GB
striim/evalversion      latest         d1d87f433300   6 weeks ago     2.23GB
postgres                11             bd902d12d4e0   5 months ago    283MB
debian                  latest         6f4986d78878   6 months ago    124MB
authelia/authelia       latest         cb3dc6f5f290   6 months ago    54.7MB
traefik/whoami          latest         e21a57f872ce   6 months ago    6.36MB
traefik                 2.4            de1a7c9d5d63   10 months ago   92MB
postgres                <none>         f977a7cc785e   13 months ago   283MB
prefecthq/server        core-0.14.19   f656f494ae63   14 months ago   396MB
prefecthq/apollo        core-0.14.19   263e3323c594   14 months ago   320MB
prefecthq/ui            core-0.14.19   89ef3214d768   14 months ago   192MB
hello-world             latest         d1165f221234   15 months ago   13.3kB
hasura/graphql-engine   v1.3.3         cf9add618ad6   19 months ago   48.5MB


[root@rb-nwcloudera-1 admin]# docker ps
CONTAINER ID   IMAGE     COMMAND                  CREATED      STATUS      PORTS                                                 NAMES
c0dcd9368a1b   striimo   "sh -c '/tmp/striim-…"   4 days ago   Up 2 days   1527/tcp, 0.0.0.0:9080->9080/tcp, :::9080->9080/tcp   admiring_shannon

Kindly advise.
Reply | Threaded
Open this post in threaded view
|

Re: mount NFS on docker

ErmanArslansOracleBlog
Administrator
You may need to build or maybe pull the latest image before running it..