1


我正在创建一个 Docker 映像来运行 PocketMine-MP。唯一的问题是,一旦它被构建并且我尝试运行它会给出这个输出的图像。(这意味着它与我的机器不兼容)

standard_init_linux.go:185: exec user process caused "exec format   error"

我目前正在运行 Ubuntu 16.04。以下是我的 Dockerfile。

FROM ubuntu:latest

MAINTAINER Nathaniel Fredericks <me@nathfreder.website>

ARG POCKETMINE_BINARY=https://jenkins.pmmp.io/job/PHP-7.2-Linux-x86_64/lastSuccessfulBuild/artifact/PHP_Linux-x86_64.tar.gz
ARG POCKETMINE_ARCHIVE=https://jenkins.pmmp.io/job/PocketMine-MP/lastSuccessfulBuild/artifact/PocketMine-MP.phar
ARG POCKETMINE_START=https://rawgit.com/pmmp/PocketMine-MP/master/start.sh

RUN apt-get update
RUN apt-get install -y curl

RUN curl ${POCKETMINE_BINARY} -o PHP_Linux-x86_64.tar.gz
RUN mkdir /root/server
RUN tar xf PHP_Linux-x86_64.tar.gz -C /root/server
RUN rm PHP_Linux-x86_64.tar.gz

WORKDIR "/root/server"

RUN curl ${POCKETMINE_ARCHIVE} -o PocketMine-MP.phar
RUN curl ${POCKETMINE_START} -o start.sh

RUN mkdir -p plugins
RUN mkdir -p players
RUN mkdir -p worlds
RUN mkdir -p resource_packs

RUN chmod +x ./start.sh

CMD ["./start.sh", "--no-wizard", "--disable-ansi"] # EDIT: This is the problem, the encoding is ASCII text.

提前致谢。

4

1 回答 1

0

这与您的架构无关,您指向 start.sh 的链接是错误的。

好的是

ARG POCKETMINE_START=https://raw.githubusercontent.com/pmmp/PocketMine-MP/master/start.sh

你有这个错误,因为你的 start.sh 实际上是这样的:

root@7787ad261644:~/server# cat start.sh 
<p>Moved Permanently. Redirecting to <a href="https://raw.githubusercontent.com/pmmp/PocketMine-MP/master/start.sh">https://raw.githubusercontent.com/pmmp/PocketMine-MP/master/start.sh</a></p>
于 2018-04-05T16:41:45.627 回答