-
Notifications
You must be signed in to change notification settings - Fork 125
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
Podman gvproxy mamba #444
base: master
Are you sure you want to change the base?
Podman gvproxy mamba #444
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
description = "gvproxy is a new network stack based on gVisor." | ||
binaries = ["gvproxy"] | ||
test = "gvproxy --version" | ||
|
||
version "0.7.3" { | ||
auto-version { | ||
github-release = "containers/gvisor-tap-vsock" | ||
version-pattern = "v(.*)" | ||
} | ||
} | ||
|
||
platform "linux" { | ||
source = "https://github.com/containers/gvisor-tap-vsock/releases/download/v${version}/gvproxy-linux-${arch}" | ||
|
||
on "unpack" { | ||
rename { | ||
from = "${root}/gvproxy-linux-amd64" | ||
to = "${root}/gvproxy" | ||
} | ||
} | ||
} | ||
|
||
platform "darwin" { | ||
source = "https://github.com/containers/gvisor-tap-vsock/releases/download/v${version}/gvproxy-darwin" | ||
|
||
on "unpack" { | ||
rename { | ||
from = "${root}/gvproxy-darwin" | ||
to = "${root}/gvproxy" | ||
} | ||
} | ||
} | ||
|
||
platform "windows" { | ||
source = "https://github.com/containers/gvisor-tap-vsock/releases/download/v${version}/gvproxy-windows.exe" | ||
|
||
on "unpack" { | ||
rename { | ||
from = "${root}/gvproxy-windows.exe" | ||
to = "${root}/gvproxy.exe" | ||
} | ||
} | ||
} | ||
|
||
sha256sums = { | ||
"https://github.com/containers/gvisor-tap-vsock/releases/download/v0.7.3/gvproxy-linux-amd64": "a0532048e2310c1f4b3c438a502fee651b5c3dc4360ff66a29204047145b3d63", | ||
"https://github.com/containers/gvisor-tap-vsock/releases/download/v0.7.3/gvproxy-linux-arm64": "996c526e4291926129c5a76f8e673c01bde98c1be51457ded3e419605b54c6f8", | ||
"https://github.com/containers/gvisor-tap-vsock/releases/download/v0.7.3/gvproxy-darwin": "a69c0d00d3ae3e295aa5b45ab664ef8c3e2094937d9d63af743c8440d22ead21", | ||
"https://github.com/containers/gvisor-tap-vsock/releases/download/v0.7.3/gvproxy-windows.exe": "bd2687b203a2f0dc27169c0c017b64d1408a89e8cd1e11c115cbb2d93f106086", | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ description = "A tool for managing OCI containers and pods." | |
sha256-source = "https://github.com/containers/podman/releases/download/v${version}/shasums" | ||
binaries = ["podman"] | ||
source = "https://github.com/containers/podman/releases/download/v${version}/podman-remote-static-linux_${arch}.tar.gz" | ||
requires = [ "gvproxy" ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ignoring the other issues, I won't merge this change. We don't want to set opinionated defaults in packages. |
||
|
||
platform "darwin" { | ||
source = "https://github.com/containers/podman/releases/download/v${version}/podman-remote-release-darwin_${arch}.zip" | ||
|
@@ -64,13 +65,27 @@ version "4.4.1" "4.4.4" "4.5.0" "4.5.1" "4.6.0" "4.6.1" "4.6.2" "4.7.0" "4.7.1" | |
|
||
platform "linux" { | ||
source = "https://github.com/containers/podman/releases/download/v${version}/podman-remote-static-linux_${arch}.tar.gz" | ||
env = { | ||
"CONTAINERS_CONF": "${HERMIT_ENV}/.hermit/podman/containers.conf", | ||
"CONTAINER_HOST": "unix://${HOME}/.local/share/containers/podman/machine/qemu/podman.sock", | ||
} | ||
|
||
on "unpack" { | ||
rename { | ||
from = "${root}/bin/podman-remote-static-linux_${arch}" | ||
to = "${root}/podman" | ||
} | ||
} | ||
|
||
on "install" { | ||
mkdir { | ||
dir = "${HERMIT_ENV}/.hermit/podman" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately this won't do what you hope. Install hooks only trigger once per machine-wide install, so updating the Hermit environment isn't reliable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah. ok. so this should be on activation then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no real way to do what you want reliably in Hermit :( Activation triggers when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it only needs to be done once. if it's done immediately after install then all is good. if there is no way to do this, then the only solution is to replace podman with a shell script that takes care of the initialization if not done. thoughts? |
||
} | ||
run { | ||
cmd = "/bin/bash" | ||
args = ["-c", "echo \"[engine]\n helper_binaries_dir = [\n \"'\"'\"${HERMIT_ENV}/bin\"'\"'\"\n]\n\" > \"${HERMIT_ENV}/.hermit/podman/containers.conf\""] | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
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.
This package seems good though, happy to add it.
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.
ok. will split the package off. and change the podman install to not depend of gvproxy and generate a setup script instead for gvproxy (rather than force the config). sound good?
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.
I must admit I don't fully understand the relationship between the two. Does podman require gvproxy? Or is it an optional thing?
Either way, I would suggest those setup scripts should go in the
gvproxy
package, not podman.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.
Podman is hard coded to use gvproxy. It cannot run without it and, when installing podman with brew, it automatically installs gvproxy as a dependency. I think having this as a dependency is fine. Theoretically, podman could use other VM proxy tools than gvproxy, but for now it's the only tool it uses. The result is quite nice - you can install podman with a single hermit install command and then build and run docker containers entirely in user space! No other installation required!