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

docs: add development-tips.md #55

Merged
merged 3 commits into from
Mar 9, 2023

Conversation

CodeMonkeyLeet
Copy link
Contributor

@CodeMonkeyLeet CodeMonkeyLeet commented Mar 1, 2023

Add documentation for debugging and testing changes to copa.

@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (3b4a6ac) 34.45% compared to head (31e0760) 34.45%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #55   +/-   ##
=======================================
  Coverage   34.45%   34.45%           
=======================================
  Files          12       12           
  Lines        1126     1126           
=======================================
  Hits          388      388           
  Misses        717      717           
  Partials       21       21           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Simon Leet <simon.leet@microsoft.com>
@sozercan
Copy link
Member

sozercan commented Mar 2, 2023

@CodeMonkeyLeet can we move this to the website docs so it's more visible?


### Extract files from the image to inspect them

`dive` won't let you read the contents of the files in the image though; to do that, you can use the `docker cp` command to copy the files out of the image to a local folder. Note that `docker cp` only works with containers and not just container images, so you will need to create a container from the image and then copy the files out of the container:
Copy link
Member

Choose a reason for hiding this comment

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

I have been using crane export to dump the filesystem. Should we mention this instead of docker cp?

You can also see diffs using

 diff \ 
    <(crane export foo:bar - | tar -tvf - | sort) \
    <(crane export foo:bar-patched - | tar -tvf - | sort)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add it to the doc because crane export is a good way to explore the entire filesystem interactively, but I switched away from extracting the entire image in my workflow because there's usually only a couple of files I want to inspect, and the dive exploration view is really handy for the per layer diffing.

Also, neat diff command line, thanks for sharing that!

@CodeMonkeyLeet
Copy link
Contributor Author

@CodeMonkeyLeet can we move this to the website docs so it's more visible?

I'm open to it, I'll leave it to @salaxander's discretion. For other projects I've worked on, maintainer-facing docs tend to be in the repo and user-facing docs tend to be in the docs site.

Simon Leet and others added 2 commits March 7, 2023 10:19
Signed-off-by: Simon Leet <simon.leet@microsoft.com>
@sozercan sozercan merged commit 60433a8 into project-copacetic:main Mar 9, 2023
ashnamehrotra pushed a commit to ashnamehrotra/copacetic that referenced this pull request Aug 25, 2023
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.

None yet

3 participants