httpose
A quick and dirty solution to "HTTP-expose" secret meant for Docker build.
Caveat: This does not employ any SSL over HTTP, and assumes the working
networking environment is safe without encryption (e.g. localhost
).
Simply run
```bash
127.0.0.1:2048
by default./httpose (secret will be consumed via stdin)
echo xxx | ./httpose
HTTPOSE_SECRET=xxx ./httpose
echo xxx > /tmp/secret ./httpose -f /tmp/secret
rm /tmp/secret
./httpose -a 0.0.0.0:12345
./httpose -h ```
You can get the secret value by curl
-ing or wget
when the service is up:
```bash
curl -s http://127.0.0.1:2048/
wget -qO - http://127.0.0.1:2048/ ```
See CHANGELOG.md for more details.
You will need to install cargo
and rustc
. See (rustup
)[https://rustup.rs]
for more information.
To build in release mode via cargo
, simply run:
bash
cargo build --release
To execute, simply run:
bash
cargo run --release -- [args...]
To build the image, simply run:
```bash docker build . -t httpose
docker run --rm -it --net host httpose
docker run --rm -it -p 2048:2048 httpose -a "0.0.0.0:2048"
docker run -e HTTPOSE_SECRET=xxx --rm -it --net host httpose
docker run -v "pwd
/xxx:/xxx" --rm -it --net host httpose -f "/xxx"
docker run --rm -it httpose -h ```