我有一個完美的外殼運行命令:翻譯bash命令到碼頭工人CMD
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
現在我想從啓動泊塢窗容器中運行這個命令。因此,在這Dockerfile的底部我:
CMD ["bash", "start-stop-daemon", "--quiet", "--oknodo", "--start", "--pidfile", "/run/myprocess.pid", "--background", "--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語法。有任何想法嗎?
這會有所幫助,但現在我得到的錯誤:啓動 - 停止守護:需要--start或--stop或--status之一。看起來該命令沒有正確解析。 –