我知道类似的问题已经得到了回答,但到目前为止对我没有什么作用。
我在Windows上使用码头和码头组合。我正在尝试用参数启动一个Bash脚本。
这是我的文档:
FROM ubuntu
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils \
&& apt-get -y install sudo \
&& echo "Set disable_coredump false" >> /etc/sudo.conf \
&& sudo apt-get install -y -q \
&& apt-get -y install python3.8 \
&& apt-get -y install python3.8-dev \
&& apt-get -y install python3-pip \
&& apt-get -y install git \
&& apt-get -y install curl \
&& mkdir prysm && cd prysm \
&& curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh --output prysm.sh && chmod +x prysm.sh
ENTRYPOINT ["/bin/bash", "-c", "/prysm/prysm.sh", "beacon-chain", "--config-file=/beacon-config/config.yaml"]脚本prysm.sh以以下内容开头:
#!/bin/bash ...and的结尾是:
exec -a "$0" "${process}" "${@:2}"在这里可以看到整个脚本:https://github.com/prysmaticlabs/prysm/blob/db9e02d7d10ac883df371cbb797ba8d03e88619c/prysm.sh
我的docker-compose.yaml文件与dockerfile位于同一个文件夹中。它的内容如下:
version: "3"
services:
beacon-node:
build: .
ports:
- "3500:3500"
- "4000:4000"
- "8080:8080"
volumes:
- ./data:/beacon-node-data
- ./keys:/beacon-keys
- ./config:/beacon-config命令停靠-组合给了我以下结果:
Starting ethereum2beaconnode_beacon-node_1 ... done
Attaching to ethereum2beaconnode_beacon-node_1
ethereum2beaconnode_beacon-node_1 exited with code 0我尝试使用以下命令检查容器的日志:
docker logs ethereum2beaconnode_beacon-node_1 但它返回一个空行。
我试了很多次,但到目前为止都没有用。我不知所措。
发布于 2020-08-01 09:34:53
入口点不正确,将其替换为:
CMD ["/prysm/prysm.sh", "beacon-chain", "--config-file=/beacon-config/config.yaml"]当我运行docker-compose up的时候
Creating docker_beacon-node_1 ... done
Attaching to docker_beacon-node_1
beacon-node_1 | Latest Prysm version is v1.0.0-alpha.17.
beacon-node_1 | Downloading beacon chain@v1.0.0-alpha.17 to /prysm/dist/beacon-chain-v1.0.0-alpha.17-linux-amd64 (automatically selected latest available version)
beacon-node_1 | % Total % Received % Xferd Average Speed Time Time Time Current
beacon-node_1 | Dload Upload Total Spent Left Speed
100 42.5M 100 42.5M 0 0 3272k 0 0:00:13 0:00:13 --:--:-- 3316k
beacon-node_1 | Verifying binary integrity.
beacon-node_1 | gpg: key 72E33E4DF1A5036E: public key "Preston Van Loon <preston@prysmaticlabs.com>" imported
beacon-node_1 | gpg: Total number processed: 1
beacon-node_1 | gpg: imported: 1
beacon-node_1 | beacon-chain-v1.0.0-alpha.17-linux-amd64: OK
beacon-node_1 | gpg: Signature made Fri Jul 31 03:31:33 2020 UTC
beacon-node_1 | gpg: using RSA key 0AE0051D647BA3C1A917AF4072E33E4DF1A5036E
beacon-node_1 | gpg: Good signature from "Preston Van Loon <preston@prysmaticlabs.com>" [unknown]
beacon-node_1 | gpg: WARNING: This key is not certified with a trusted signature!
beacon-node_1 | gpg: There is no indication that the signature belongs to the owner.
beacon-node_1 | Primary key fingerprint: 0AE0 051D 647B A3C1 A917 AF40 72E3 3E4D F1A5 036E
beacon-node_1 | Verified /prysm/dist/beacon-chain-v1.0.0-alpha.17-linux-amd64 has been signed by Prysmatic Labs.
beacon-node_1 | Starting Prysm beacon-chain --config-file=/beacon-config/config.yaml
Gracefully stopping... (press Ctrl+C again to force)
Stopping docker_beacon-node_1 ... done带着入口点,我得到了:
Recreating docker_beacon-node_1 ... done
Attaching to docker_beacon-node_1
beacon-node_1 | Usage: ./prysm.sh PROCESS FLAGS.
beacon-node_1 | ./prysm.sh PROCESS --download-only.
beacon-node_1 | PROCESS can be beacon-chain, validator, or slasher.
docker_beacon-node_1 exited with code 1https://stackoverflow.com/questions/63202092
复制相似问题