シェルで完全に実行されるコマンドがあります。
start-stop-daemon --quiet --oknodo --start --pidfile /run/my.pid --background --make-pidfile --exec /opt/socat-1.7.2.4/socat PTY,link=/dev /ttyMY,echo=0,raw,unlink-close=0 TCP-LISTEN:9334,reuseaddr,fork
ここで、起動時に docker コンテナーからこのコマンドを実行したいと考えています。だから私が持っているDockerfileの一番下に:
CMD [「bash」、「start-stop-daemon」、「--quiet」、「--oknodo」、「--start」、「--pidfile」、「/run/myprocess.pid」、「--バックグラウンド", "--make-pidfile", "--exec", "/opt/socat-1.7.2.4/socat", "PTY,link=/dev/ttyPROCESS,echo=0,raw,unlink-close= 0", "TCP-LISTEN:9334,reuseaddr,fork"]
ただし、コンテナーはエラーで終了します。
/sbin/start-stop-daemon: /sbin/start-stop-daemon: cannot execute binary file
CMD 構文に問題があると思います。何か案は?