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

Error: FATAL unable to initialize a image struct: #2432

Closed
sjgupta19 opened this issue Jun 30, 2022 · 4 comments
Closed

Error: FATAL unable to initialize a image struct: #2432

sjgupta19 opened this issue Jun 30, 2022 · 4 comments
Labels
triage/support Indicates an issue that is a support question.

Comments

@sjgupta19
Copy link

Hi,
I am using trivy scanner via azure/container-scan github action and running into the following error(screenshot attached). It was running file till yesterday. Below are the configs that I am using -
image

image

@sjgupta19 sjgupta19 added the triage/support Indicates an issue that is a support question. label Jun 30, 2022
@arman1371
Copy link

This problem came from dockle, just set DOCKLE_HOST: "unix:///var/run/docker.sock" env in your workflow, fixes the problem.

seems dockle (used in scan-container action) uses DOCKLE_HOST and XDG_RUNTIME_DIR env to select the docker runtime. and in GitHub runner, the XDG_RUNTIME_DIR is set to: /run/user/1001
So if you don't set the DOCKLE_HOST env, it uses unix:///run/user/1001/docker.sock as DOCKLE_HOST and can't find the correct docker sock file.
(https://github.com/goodwithtech/dockle/blob/b9072c973f637e4f62b8c0bf49df705b118c4637/pkg/app.go#L39)

@sjgupta19
Copy link
Author

thanks that worked. it was working yesterday, why this broke all of a sudden? dont see any changes pushed to dockle repo.

@arman1371
Copy link

Maybe change in GitHub runners (update)

@knqyf263
Copy link
Collaborator

knqyf263 commented Jul 3, 2022

Thanks for your help, @arman1371!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

3 participants