What does "set --" do in this Dockerfile entrypoint?
102
votes
2
answers
66182
views
I'm trying to understand what this Docker entrypoint does .
It seems to me that's a very common pattern when writing Dockerfiles, but my bash skills are limited and I have no idea of all the special bash symbols kung fu.
Also, it's hard to google for "--", "$!" etc. What are these called in bash world?
To summarize, what is the line bellow trying to do?
if [ "${1#-}" != "$1" ]; then
set -- haproxy "$@"
fi
Asked by Lucas Pottersky
(1123 rep)
Sep 6, 2016, 06:56 PM
Last activity: Jan 18, 2023, 10:13 AM
Last activity: Jan 18, 2023, 10:13 AM