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

Cyt 814 docker scout #193

Merged
merged 10 commits into from
Jun 18, 2024
Merged

Cyt 814 docker scout #193

merged 10 commits into from
Jun 18, 2024

Conversation

KendallHarterAtWork
Copy link
Collaborator

Summary

If merged this pull request will add support for running Docker Scout on Docker .tar and .tar.gz files

Copy link
Collaborator

@nightlark nightlark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename docker_file.py to docker_image.py to clarify that it is getting info from a docker image rather than a Dockerfile -- would be neat to get the original Dockerfile for an image, that would be like getting access to source code.

surfactant/filetypeid/id_magic.py Outdated Show resolved Hide resolved
surfactant/filetypeid/id_magic.py Outdated Show resolved Hide resolved
surfactant/filetypeid/id_magic.py Outdated Show resolved Hide resolved
surfactant/infoextractors/docker_file.py Outdated Show resolved Hide resolved
surfactant/infoextractors/docker_file.py Outdated Show resolved Hide resolved
surfactant/infoextractors/docker_file.py Outdated Show resolved Hide resolved
surfactant/infoextractors/docker_file.py Outdated Show resolved Hide resolved
surfactant/cmd/generate.py Outdated Show resolved Hide resolved
surfactant/cmd/generate.py Outdated Show resolved Hide resolved
surfactant/infoextractors/docker_file.py Outdated Show resolved Hide resolved

def is_docker_scout_installed():
# Check that Docker Scout can be run
result = subprocess.run(["docker", "scout", "--help"], capture_output=True, check=False)
Copy link
Collaborator

@nightlark nightlark May 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the CI tests, it looks like subprocess.run can sometimes throw a FileNotFoundError that should be caught (are there any other error types that can be thrown?) if the docker command isn't installed on a system.

Co-authored-by: Ryan Mast <3969255+nightlark@users.noreply.github.com>
@nightlark nightlark merged commit c6eaca0 into main Jun 18, 2024
11 checks passed
@nightlark nightlark deleted the CYT-814-docker-scout branch June 18, 2024 17:19
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

Successfully merging this pull request may close these issues.

2 participants