Reputation: 503
I am having very basic knowledge with ubuntu(linux) os and have just started with dockers.
Now I have to create a postman/newman docker which is having a volume(or any other storage type) containing postman collection jsons, environment jsons and data jsons.
I have tried to google and understand and also gone through the documentation provided here.
I have already setup the docker for ubuntu(linux).
Now I have created a directory with name "Newman Docker" on "/home/user" path.
Afterwards I have created a directory with name "collections" having collection and environment files inside the "Newman Docker" directory.
Now via terminal I have navigated upto "Newman Docker" directory.
Afterwards I have used docker pull postman/newman:ubuntu
command.
Now when trying to run below command, but it is not working:
docker run -v ~/collections:/etc/newman -t postman/newman:ubuntu \
run "xyz.postman_collection.json" \
--environment="abc.postman_environment.json" \
--reporters="json,cli" --reporter-json-export="newman-results.json"
Can anyone please let me know how to solve this problem?
Upvotes: 1
Views: 3075
Reputation: 503
I was getting "enoent no such file" error which is solved now.
First I renamed the directory "Newman Docker" to "newmanDocker" for ease of using commands.
And then I had not given path from root directory which I have provided now, below is the updated command for the same:
docker run -v ~newmanDocker/collections:/etc/newman -t postman/newman:ubuntu \
run "xyz.postman_collection.json" \
--environment="abc.postman_environment.json" \
--reporters="json,cli" --reporter-json-export="newman-results.json"
Upvotes: 3