无法执行二进制文件Docker Pterodactyl

问题描述

我正在尝试将机器人添加到Docker容器(翼手龙面板)。获取无法执行二进制文件错误。我发现其他人也提出了类似的问题,但不是关于翼手龙,它有很多自定义文件规则,例如Dockerfile中的规则。任何方向将不胜感激。

Dockerfile

$ cat Dockerfile
FROM node:10-alpine

LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"

copY . /srv/daemon

workdir /srv/daemon

RUN apk add --no-cache openssl make gcc g++ python linux-headers paxctl gnupg tar zip unzip curl coreutils zlib supervisor jq \
 && npm install --production \
 && addgroup -S pterodactyl && adduser -S -D -H -G pterodactyl -s /bin/false pterodactyl \
 && apk del --no-cache make gcc g++ python linux-headers paxctl gnupg \
 && curl -sSL https://github.com/pterodactyl/sftp-server/releases/download/$(curl --silent "https://api.github.com/repos/pterodactyl/sftp-server/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')/sftp-server > /srv/daemon/sftp-server \
 && mkdir -p /var/log/supervisord /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 \
 && chmod +x /srv/daemon/sftp-server \
 && chmod +x /srv/daemon/.docker/entrypoint.sh \
 && cp /srv/daemon/.docker/supervisord.conf /etc/supervisord.conf

EXPOSE 8080

ENTRYPOINT [ "/bin/ash","/srv/daemon/.docker/entrypoint.sh" ]

CMD [ "supervisord","-n","-c","/etc/supervisord.conf" ]

entrypoint.sh

cat .docker/entrypoint.sh
#!/bin/ash
## Ensure we are in /srv/daemon

if [ $(cat /srv/daemon/config/core.json | jq -r '.sftp.enabled') == "null" ]; then
    echo -e "Updating config to enable sftp-server."
    cat /srv/daemon/config/core.json | jq '.sftp.enabled |= false' > /tmp/core
    cat /tmp/core > /srv/daemon/config/core.json
elif [ $(cat /srv/daemon/config/core.json | jq -r '.sftp.enabled') == "false" ]; then
    echo -e "Config already set up for golang sftp server"
else
    echo -e "You may have purposly set the sftp to true and that will fail."
fi

exec "$@"

预先感谢, 一号

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)