This is the most basic kind of docker querying you will find. Does not support HTTPS. Seems to work for local docker engines. Has not been tested against remote docker engines, or full URLs. Note that if you want this to work you'll have to configure docker to allow manipulation without being root, i.e., the user you connect as will need to be in the `docker` group. This was done instead of pulling in the `bollard` crate. Maybe I'm being silly, but `bollard` uses a whole lot of other crates in the name of being general and robust. These crates, however, add an unacceptable size to the final binary. (In the experiment I ran, on a release build, the binary size went from 2904696 to 4840968 bytes: an increase of 1.8 MB. With this patch the release binary is 2986360 bytes, which is an increase of 80k.) I wanted to see exactly what I could get away with when it came to talking to docker. This here actually seems like a fine compromise: HTTP is very simple if you only have to worry about one specific server, and JSON is not very hard to parse if you don't care too much about error handling, or are willing to play fast and loose with punctuation (which I am).
42 lines
949 B
TOML
42 lines
949 B
TOML
[package]
|
|
name = "fwd"
|
|
version = "0.9.0"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
description = "Automatically forward ports to a remote server over ssh"
|
|
homepage = "https://github.com/DeCarabas/fwd"
|
|
repository = "https://github.com/DeCarabas/fwd"
|
|
readme = "README.md"
|
|
|
|
[[bin]]
|
|
name = "fwd-browse"
|
|
test = false
|
|
bench = false
|
|
|
|
[dependencies]
|
|
anyhow = "1.0"
|
|
bytes = "1"
|
|
copypasta = "0.10.1"
|
|
crossterm = { version = "0.25", features = ["event-stream"] }
|
|
home = "0.5.4"
|
|
indoc = "1"
|
|
log = { version = "0.4", features = ["std"] }
|
|
open = "3"
|
|
rand = "0.8.5"
|
|
thiserror = "1.0"
|
|
tokio = { version = "1", features = ["io-std", "io-util", "macros", "net", "process", "rt", "rt-multi-thread", "fs"] }
|
|
tokio-stream = "0.1"
|
|
toml = "0.5"
|
|
tui = "0.19"
|
|
xdg = "2"
|
|
|
|
[dev-dependencies]
|
|
assert_matches = "1"
|
|
pretty_assertions = "1"
|
|
tempdir = "0.3"
|
|
|
|
[target.'cfg(target_os="linux")'.dependencies]
|
|
procfs = "0.14.1"
|
|
|
|
[target.'cfg(target_family="unix")'.dependencies]
|
|
users = "0.11"
|