Mastering Development

Starting a docker container with a bash script with parameters (container exited with code 0)

I realize similar questions have been answered but nothing has worked for me so far.

I use docker and docker-compose on Windows.
I’m trying start a Bash script with parameters.

Here is my dockerfile:

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 --output && chmod +x 

ENTRYPOINT ["/bin/bash", "-c", "/prysm/", "beacon-chain", "--config-file=/beacon-config/config.yaml"]

The script starts with:


…and ends with:

 exec -a "$0" "${process}" "${@:2}"

The whole script can be seen here:

My docker-compose.yaml file is in the same folder as the dockerfile. Here is its content:

version: "3"
        build: .
            - "3500:3500"
            - "4000:4000"
            - "8080:8080"
         - ./data:/beacon-node-data
         - ./keys:/beacon-keys
         - ./config:/beacon-config

The command docker-compose up gives me the following result:

Starting ethereum2beaconnode_beacon-node_1 ... done
Attaching to ethereum2beaconnode_beacon-node_1
ethereum2beaconnode_beacon-node_1 exited with code 0

I have tried checking the logs of the container with this command:

docker logs ethereum2beaconnode_beacon-node_1  

But it returns an empty line.

I have tried many thing but nothing worked so far. I am at loss.

Leave a Reply

Your email address will not be published. Required fields are marked *