-
Notifications
You must be signed in to change notification settings - Fork 189
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
hack: expand snapshots inside docker #205
hack: expand snapshots inside docker #205
Conversation
@jaypipes and me talked a bit offline about how snapshots should look like, which the challenges are with symlinks, and in short why $ docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.0-docker)
Server:
Containers: 16
Running: 0
Paused: 0
Stopped: 16
Images: 96
Server Version: 20.10.1 so let's discuss! worst case we can have a great reference to document why should NOT go this way :) |
0e004a4
to
c17aa01
Compare
and with my latest commit works as well with /usr/bin/podman version
Version: 2.2.1
API Version: 2.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice, @fromanirh! Just a few nits and suggestions inline, but overall I think this is great. Really cleans up the snapshot experience.
SNAPSHOT.md
Outdated
For GHW, snapshots are partial clones of the `/proc`, `/sys` (et. al.) subtrees taken into arbitrary | ||
machines, which GHW can consume later. "partial" is because the snapshot doesn't need to contain a | ||
complete copy of all the filesystem subtree (that is doable but inpractical). It only needs to contain | ||
the paths GHW cares about. The snapshot concept was introduced [to make GHW easier to test](https://github.com/jaypipes/ghw/issues/66). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
GHW gained support to consume snapshot programmatically. This means there is no need anymore to expand the snapshot before mount it in docker, which greatly simplifies the `run-against-snapshot.sh` scripts. We just need to pass the snapshot and a bunch of environment variables. Additionally, start document describing how a GHW compliant snapshot should look like, and why things are the way they are. Signed-off-by: Francesco Romani <[email protected]>
add minimal changes to be able to use podman. Default is still docker. Example: CONTAINER_RUNTIME=podman ./hack/run-against-snapshot.sh ... Signed-off-by: Francesco Romani <[email protected]>
c17aa01
to
4ca6c8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
w00t! :)
GHW gained support to consume snapshot programmatically.
This means there is no need anymore to expand the snapshot before
mount it in docker, which greatly simplifies the
run-against-snapshot.sh
scripts.We just need to pass the snapshot and a bunch of environment variables.
Additionally, start document describing how a GHW compliant snapshot
should look like, and why things are the way they are.
Signed-off-by: Francesco Romani [email protected]