krallin / tini

A tiny but valid `init` for containers
MIT License
9.66k stars 505 forks source link

Command-line parsing is broken if compiled with TINI_MINIMAL #217

Open jeffdcarter opened 8 months ago

jeffdcarter commented 8 months ago

If tini is compiled with TINI_MINIMAL, the command line parser is bypassed, and it doesn't skip past the "--" that gets passed in by docker --init. This is because getopt() is never called in this case.

This causes docker run to always fail with "exec: --: no such file or directory"

I only discovered this because this is apparently how it is built in this ancient rpm: docker-1.13.1-53.git774336d.el7.centos.x86_64.rpm from CentOS Atomic. Installing a more up-to-date docker rpm that builds it correctly it works fine.