I attempted to use this overlay to keep a service running for nordvpn's app. Unfortunately, it keeps erroring out with the error stated in the title:
来自:https://github.com/just-containers/s6-overlay/issues/279
FROM ubuntu:latest ARG OverlayVersion="1.22.1.0" ARG HostArchitecture="armhf" ADD https://github.com/just-containers/s6-overlay/releases/download/v${OverlayVersion}/s6-overlay-${HostArchitecture}.tar.gz /tmp/ RUN tar xzf /tmp/s6-overlay*.tar.gz -C / #RUN \ # tar xzf /tmp/s6-overlay-*.tar.gz -C / --exclude="./bin" --exclude="./sbin" && \ # tar xzf /tmp/s6-overlay-*.tar.gz -C /usr ./bin ./sbin RUN \ echo " " && echo "**** Install Base Packages Required ****" && \ apt-get -qq update && \ apt-get -qq install -yqq wget dpkg curl gnupg2 nano gcc make RUN \ echo " " && echo "**** Install NordVPN Application ****" && \ cd /tmp && wget -qnc https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/nordvpn-release_1.0.0_all.deb && \ dpkg -i nordvpn-release_1.0.0_all.deb && \ apt-get -qq update && \ apt-get -qq install -qq -y nordvpn; \ echo " " && echo "IGNORE THE DPKG ERROR " && \ echo "- Post-Installation doesn't like docker, but I work around it !!" && echo " " && \ chmod ugo+w /var/lib/nordvpn/data/ && \ echo "**** cleanup ****" && \ rm -rf \ /tmp/* \ /var/lib/apt/lists/* \ /var/tmp/* COPY root/ / ENTRYPOINT ["/init"] CMD ["bash"]
Root Folder in the directory with the dockerfile: root/etc/services.d/nordvpn/run
run
#!/bin/bash /etc/init.d/nordvpn start
tried:
#!/usr/bin/execlineb service nordvpn start
运行其中任何一个命令时,服务都会启动。但是 s6-supervisor 根本不会运行“运行”文件,因此会出现错误。奇怪的是,如果我尝试仅使用 bash 命令“./run”执行文件,则会出现这些错误(取决于上面的内容):
bash: ./run: /bin/bash^M: bad interpreter: No such file or directory or bash: ./run: /usr/bin/execlineb^M: bad interpreter: No such file or directory
、
I have seen this issue when creating scripts in Windows env and then porting over to run on a Unix environment.
所以问题源于在 Windows 环境中使用 Notepad++ 创建我的脚本。构建文件夹位于 samba 共享驱动器上,以便于在我的pi上进行编码。我什至不认为会出现这个问题,因为它是一个这样的准系统文件。
修改为unix格式修复
解决方案:在这里刷新了正确的循环礼仪,但在我复制到根文件夹后运行了 docker 文件。我在 dockerfile 期间执行它,因为它是映像构建期间的一次性操作。 (显然现在我需要将 dos2unix 添加到构建中。但如果空间是这样一个问题,如果需要,我可以在执行操作后将其删除。)
现在脚本正常运行。
历史上的文章
- 2020: Armbian Xfce 桌面環境添加簡體中文( 0)
- 2020: VM虛擬機下 CentOS 7如何擴大磁盤空間大小( 0)
- 2015: Wosign沃通免费SSL申请、安装教程( 0)
- 2015: Windows2008+Apache服务器系统下配置https协议( 0)
- 2013: 测试文章( 0)
除特别注明外,本站所有文章均为LJY IT BLOG原创,转载请注明出处来自https://www.ljy2345.com/2021/08/s6-supervise-child-s6-fatal-unable-to-spawn-run-no-such-file-or-directory/
Comments | NOTHING