packj icon indicating copy to clipboard operation
packj copied to clipboard

Cannot run on Docker: Missing host volume at /tmp/packj. Run Docker/Podman with "-v /tmp:/tmp/packj" argument.

Open KhoiUna opened this issue 3 years ago • 7 comments

I run this command with Docker on Windows.

image

KhoiUna avatar Sep 27 '22 02:09 KhoiUna

Please do not open an issue without providing more details. What machine are you using? Is this a Linux system?

ashishbijlani avatar Sep 27 '22 03:09 ashishbijlani

Please do not open an issue without providing more details. What machine are you using? Is this a Linux system?

@ashishbijlani I run this command with Docker on Windows.

KhoiUna avatar Sep 27 '22 04:09 KhoiUna

Packj currently only supports Linux systems.

ashishbijlani avatar Sep 27 '22 04:09 ashishbijlani

I am facing the same issue, when I use Git for Windows (Windows 11) git-bash.exe to run packj using docker docker run -v /tmp:/tmp/packj -it ossillate/packj:latest audit --trace -p npm:express I get the following error Missing host volume at /tmp/packj. Run Docker/Podman with "-v /tmp:/tmp/packj" argument.

But when I run it using Command Prompt, I get a result image

Packj currently only supports Linux systems.

About this, doesn't docker create a Linux environment, so there's no reason for it to not work on Windows, at least that's what I think?

tscpiece avatar Jul 18 '24 11:07 tscpiece

Thanks for your feedback! This error is not related to Packj running on Windows. The JSON output produced includes GitHub repo commit information, which is incompatible with JSON formatting. It should be a quick fix. Do you want to take a look and provide a fix?

ashishbijlani avatar Jul 19 '24 16:07 ashishbijlani

My original problem wasn't this JSON serialization error, my problem was that packj works on Command Prompt but it doesn't work on Git Bash

Screenshot of Command Prompt image

Screenshot of Git Bash image

I am getting error form line 1151 in packj/packj/audit/main.py.

I am running both shells on the same Windows 11 machine

As for the JSON serialization error I don't know how to fix it but I'll help if you need anything.

tscpiece avatar Jul 20 '24 04:07 tscpiece

Thanks for the clarification! Looks like Git bash is not able to honor Docker mount -v /tmp:/tmp/packj command. This error has nothing to do with Packj. It is related to Git bash behavior being different from Cmd prompt with Docker.

ashishbijlani avatar Jul 25 '24 01:07 ashishbijlani