I’m fairly new with docker, however I came across various blogs on how to run local collections on docker, but I still get an error, any help would be appreciate. I have the following that I would like to mount on the newman image
docker run -v /C:/Users/name.surname/collection:/etc/postman -t postman/newman_ubuntu1404 \run “https:/www.getpostman.com/collections/xxxxx” --environment=“Test.postman_environment.json” ----ssl-client-cert test.cer --ssl-client-key test.key --insecure --testReportFile=“newman-report.xml”
and the error I get is as follows docker: Error response from daemon: invalid mode: /etc/postman.
unfortunately I don't seem to understand this error to resolve it.
The format for volume to mount a bind is
-v <source>:<destination>:<mode>
mode can be optional and doesnt have to be passed. The issue is in your source, you pass in a colon which is a separator of the fields in the volume attributes.-v /C<:>/Users/msingathi.majola/collection<:>/etc/postman
I have wrapped your colons in
< >
just to highlight them but as you see it will read it asWhich is why you get the error
invalid mode: /etc/postman
. You should instead specify the volume parameters explicitly using--mount
.