Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KhoiUna opened this issue Sep 27, 2022 · 7 comments

Comments

@KhoiUna
Copy link

KhoiUna commented Sep 27, 2022

I run this command with Docker on Windows.

image

@ashishbijlani
Copy link
Collaborator

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

@KhoiUna
Copy link
Author

KhoiUna commented Sep 27, 2022

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.

@ashishbijlani
Copy link
Collaborator

ashishbijlani commented Sep 27, 2022

Packj currently only supports Linux systems.

@tscpiece
Copy link

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?

@ashishbijlani
Copy link
Collaborator

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 ashishbijlani reopened this Jul 19, 2024
@tscpiece
Copy link

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.

@ashishbijlani
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants