0

I'm newbie for docker. I want to shared files with zalenium but how can I pass accessModes:ReadWriteMany?

My test case needs to file upload.

I run zalenium like below

docker run --rm -ti -d --name zalenium -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /d/Zalanium/:/home/seluser/videos -v /d/shared_folder:/data --privileged   dosel/zalenium start --videoRecordingEnabled false

I have a file to share with zalenium contaniers.

My shared folders : -v /d/shared_folder:/data

When I looked at zalenium website, They mentioned about shared folders

Like the Docker version of Zalenium, the Kubernetes version can automatically mount shared folders, the only catch is that when you are using persistent volumes you need to make sure that the Access Mode is set to ReadWriteMany, otherwise the selenium nodes will not be able to mount it.

I have not found any example.

Thank you for in advanced.

Enes Pekkaya
  • 304
  • 2
  • 3
  • 14
  • Could you add more information, please? For example, post your Dockerfile and what do you exactly want to do. I underestand that you want to create a container with Zalenium and maybe share a folder from your host to the container but it's not clear. – Alejandro Galera May 28 '18 at 07:38
  • thakn you @mulg0r. I shared details what I wanted to do. – Enes Pekkaya May 28 '18 at 10:01

1 Answers1

1

The answer is written on zalenium wesite. I have missed that part.

Answer is below :

This is a collection of folders that you can mount as volumes when starting Zalenium by prefixing the destination with /tmp/node/, and it will be mapped across all the docker-selenium containers from the root folder after stripping the /tmp/node/ prefix.

For example, mounting: -v /your/local/folder:/tmp/node/home/seluser/folder will map to /home/seluser/folder on the node.

This can be used to provide further customization to your nodes, such as adding client certificates for your browser, or mimicking prior multi-purpose folder, both shown below.

Enes Pekkaya
  • 304
  • 2
  • 3
  • 14