我有一个完美的外壳运行命令:翻译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之一。看起来该命令没有正确解析。 –