Slim(toolkit): Don't change anything in your container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)
Apache License 2.0
19.21k
stars
716
forks
source link
docs: Specify arg format in HTTPProbeCmd's help #458
Annotates --http-probe-cmd with some guidance on how to format its argument.
Why
Based on "cmd" in the option's name, my misadventures began when I tried --http-probe-cmd 'curl http://127.0.0.1:1234/test'. That gives the following error:
Seizing on "protocol", I then tried a number of other variations, like dropping the curl and just using http://127.0.0.1:1234/test (yields invalid HTTP probe command method), and then adding GET as the first parameter (puts me back at square 1 with an "protocol" error). Turns out the correct format is any of the following:
'' (i.e., blank) — runs a GET on / via HTTP.
<path> — runs a GET on <path> via HTTP.
<method>:<path> — runs a <method> on <path> via HTTP
<protocol>:<method>:<path> — as above, but with <protocol>
Four more varations, because each of these can also have crawl: prepended. If present (or if crawl is passed as a bareword), Crawl mode is activated.
This is probably documented somewhere already. But now it's readily accessible in the first place people will look: the --help of the command itself.
What
Annotates
--http-probe-cmd
with some guidance on how to format its argument.Why
Based on "cmd" in the option's name, my misadventures began when I tried
--http-probe-cmd 'curl http://127.0.0.1:1234/test'
. That gives the following error:Seizing on "protocol", I then tried a number of other variations, like dropping the
curl
and just usinghttp://127.0.0.1:1234/test
(yieldsinvalid HTTP probe command method
), and then addingGET
as the first parameter (puts me back at square 1 with an "protocol" error). Turns out the correct format is any of the following:''
(i.e., blank) — runs a GET on/
via HTTP.<path>
— runs a GET on<path>
via HTTP.<method>:<path>
— runs a<method>
on<path>
via HTTP<protocol>:<method>:<path>
— as above, but with<protocol>
crawl:
prepended. If present (or ifcrawl
is passed as a bareword), Crawl mode is activated.This is probably documented somewhere already. But now it's readily accessible in the first place people will look: the
--help
of the command itself.How Tested
n/a