I am having Entrypoint problems and I’m not sure what is happening.
On my master-node I created a directory at /boinc/ and in that directory I have Dockerfile and boinc_start.sh
Dockerfile is basic:
FROM ubuntu:latest
LABEL Maintainer="Me odroid@odroid.com"
LABEL description=“Boinc3 MC1-2 image”
Everything goes fine, pulls the image from additude/boinc3.
I check the logs docker logs Seti-3 and:
root@node2-2:/boinc# docker logs Seti-3
/bin/sh: 1: /bin/sh: /boinc/boinc_start.sh: not found
/bin/sh: 1: /bin/sh: /boinc/boinc_start.sh: not found
/bin/sh: 1: /bin/sh: /boinc/boinc_start.sh: not found
/bin/sh: 1: /bin/sh: /boinc/boinc_start.sh: not found
/bin/sh: 1: /bin/sh: /boinc/boinc_start.sh: not found
/bin/sh: 1: /bin/sh: /boinc/boinc_start.sh: not found
/bin/sh: 1: /bin/sh: /boinc/boinc_start.sh: not found
/bin/sh: 1: /bin/sh: /boinc/boinc_start.sh: not found
/bin/sh: 1: /bin/sh: /boinc/boinc_start.sh: not found
I am out of ideas at this point. I have tried several things and read and read.
I can’t make it work. I need some help.
Thanks.
but… boinc_start.sh is not IN the container or accessible by the container
Then I go to a different node and I:
cd /
mkdir /boinc/ <---- that is on the host
cd /boinc/
nano boinc_start.sh <--- this is on the host
#!/bin/bash
mkdir -p /dev/input/mice
exec "$@"
nano write and save
chmod +x /boinc/boinc_start.sh
mkdir /boinc/boinc_persist
you shared boinc_persist with the container
-v /boinc/boinc_persist:/var/lib/boinc-client
but not boinc itself.
and /boinc doesn’t exist IN the container…
you didn’t create it in the Dockerfile
and didn’t map it from the host into the container on docker run
create it on the host, in the same folder as the Dockerfile, make it executable
then add this to the Dockerfile
there are comment chars in front of the text below, don’t know hot fix this forums markup
Has the problem been solved? If not, here is what you need to do.
First, create a directory from which you will build the docker image (lets call it /boinc). In this directory, ensure that there are two files: boinc_start.sh and the Dockerfile. The contents of these files should be as follows:
boinc_start.sh:
#!/bin/bash
mkdir -p /dev/input/mice
exec "$@"
Dockerfile:
FROM ubuntu:latest
LABEL Maintainer="Me odroid@odroid.com"
LABEL description=“Boinc3 MC1-2 image”
# Install BOINC
RUN apt-get update && apt-get install -y boinc-client && apt-get clean
# ADDED BY RAJ: Copy entrypoint shell script
COPY boinc_start.sh /boinc/boinc_start.sh
# ADDED BY RAJ: Make it executable
RUN chmod +x /boinc/boinc_start.sh
# Set working directory
WORKDIR /var/lib/boinc-client
# Make port 80 available
EXPOSE 80
# Create an entry point
ENTRYPOINT /boinc/boinc_start.sh
# Run BOINC by default. Expects env vars for url and account key
CMD /etc/init.d/boinc-client start; sleep 5; \
/usr/bin/boinccmd --project_attach ${boincurl} ${boinckey}; \
tail -f /var/lib/boinc-client/std*.txt
Note the additions I have made to your Dockerfile. These two commands will copy the boinc_start.sh script into the image and make it executable, as part of building the image.
Now, build the image with:
cd /boinc
docker build -t additude/boinc3 .
And push it with:
docker push additude/boinc3
From this point on, you need only the image on any node. No need to create any directories or files, or anything else. Just create and run a container with: