# Running local collection files using Docker won't work

**URL:** <https://community.postman.com/t/running-local-collection-files-using-docker-wont-work/20234>\
**Category:** Help Hub\
**Tags:** newman-project, collections\
**Created:** [February 9, 2021, 7:47pm UTC](https://community.postman.com/t/running-local-collection-files-using-docker-wont-work/20234 "2021-02-09T19:47:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martikwak](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/martikwak/32/6791_2.png) [@Martikwak](https://community.postman.com/u/Martikwak)\
**Post date:** [February 9, 2021, 7:47pm UTC](https://community.postman.com/t/running-local-collection-files-using-docker-wont-work/20234/1 "2021-02-09T19:47:48Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

Hi all,

I have successfully installed Docker, pulled newman docker image and run newman commands on the image just to make sure that all works. Then I successfully run a collection using the newman image: `docker run -t postman/newman:ubuntu run https://www.getpostman.com/collections/8a0c9bc08f062d12dcda`

When it comes to **Running Local Collection Files in Docker** I always get error. The command I run is:

`C:\Users\martinsv>docker run -v ~/collections:/etc/newman -t postman/newman:ubuntu run "Kwaki.collection.postman_collection.json"`

Then I get this error:

```
error: collection could not be loaded
  unable to read data from file "Kwaki.collection.postman_collection.json"
  ENOENT: no such file or directory, open 'Kwaki.collection.postman_collection.json'

```

This is the directory that I created in my disk:

```
C:\Users\martinsv>cd collections

C:\Users\martinsv\collections>dir
 Volume in drive C is OSDisk
 Volume Serial Number is 72C8-6C0A

 Directory of C:\Users\martinsv\collections

09/02/2021 19:24 <DIR> .
09/02/2021 19:24 <DIR> ..
09/02/2021 19:24 10,093 Kwaki.collection.postman_collection.json
08/02/2021 11:00 10,093 Kwaki_test.json
08/02/2021 11:03 507 Postman_environment.json
               3 File(s) 20,693 bytes
               2 Dir(s) 96,579,678,208 bytes free

```

Please anyone can help? I spent hours to figure it out without success.

Thanks a lot

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 9, 2021, 8:08pm UTC](https://community.postman.com/t/running-local-collection-files-using-docker-wont-work/20234/2 "2021-02-09T20:08:43Z")

</div>

Hey @Martikwak

Not sure if it will get you further forward but I run it like this, using my image, which is Newman plus the htmlextra reporter.

> **[DannyDainton/newman-reporter-htmlextra - Running The Reporter With Docker](https://github.com/DannyDainton/newman-reporter-htmlextra#running-the-reporter-with-docker)**
>
> A HTML reporter for Postman's Command Line Runner, Newman. Includes Non Aggregated Runs broken down by Iterations, Skipped Tests, Console Logs and the handlebars helpers module for better cust...

I would assist you more but I’m not at my machine right now 😁

---

<div class="post-metadata">

**Author:** ![kevin.swiber](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kevin.swiber/32/3820_2.png) [@kevin.swiber](https://community.postman.com/u/kevin.swiber)\
**Post date:** [February 9, 2021, 8:26pm UTC](https://community.postman.com/t/running-local-collection-files-using-docker-wont-work/20234/3 "2021-02-09T20:26:21Z")

</div>

Hey @Martikwak,

Looks like you’re on Windows. Can you try including the full path in your volume flag?

Command Prompt:

```auto
docker run -v C:/Users/martinsv/collections:/etc/newman -t postman/newman:ubuntu run Kwaki.collection.postman_collection.json

```

You can always use a variable for the current directory, as well. So on the regular Windows Command Prompt, I believe that would look like `%cd%/collections` while I believe you can use `${pwd}/collections` in PowerShell.

Hope that helps.

Best,

Kevin

---

<div class="post-metadata">

**Author:** ![Martikwak](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/martikwak/32/6791_2.png) [@Martikwak](https://community.postman.com/u/Martikwak)\
**Post date:** [February 10, 2021, 9:23am UTC](https://community.postman.com/t/running-local-collection-files-using-docker-wont-work/20234/5 "2021-02-10T09:23:19Z")

</div>

Hi @danny-dainton, thank you for the info. Surely I will take a look. In Jenkins I have been using different reports and also **htmlextra** which is my favorite one.

---

<div class="post-metadata">

**Author:** ![Martikwak](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/martikwak/32/6791_2.png) [@Martikwak](https://community.postman.com/u/Martikwak)\
**Post date:** [February 10, 2021, 9:23am UTC](https://community.postman.com/t/running-local-collection-files-using-docker-wont-work/20234/6 "2021-02-10T09:23:48Z")

</div>

Hi @kevin.swiber that is correct. I switched to Windows Command Prompt therefore it didn’t work besides that I’m pretty new using CLI.  
Thanks heaps! It works like a charm 😀

---

<div class="post-metadata">

**Author:** ![technical-astronaut7](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/technical-astronaut7/32/11479_2.png) [@technical-astronaut7](https://community.postman.com/u/technical-astronaut7)\
**Post date:** [March 21, 2022, 10:40am UTC](https://community.postman.com/t/running-local-collection-files-using-docker-wont-work/20234/7 "2022-03-21T10:40:57Z")

</div>

it seems the same problem but on Mac, i’am newbie, can i ask how to solve this problem. Thank you so much!  
Phans-MacBook-Air:~ root# newman run postman\_collection.json  
error: collection could not be loaded  
unable to read data from file “postman\_collection.json”  
ENOENT: no such file or directory, open ‘postman\_collection.json’

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [August 23, 2023, 3:36pm UTC](https://community.postman.com/t/running-local-collection-files-using-docker-wont-work/20234/8 "2023-08-23T15:36:26Z")

</div>

Closed on August 23, 2023, 3:36pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
