Open draschke opened 2 years ago
now I got a more speaking message.
/usr/local/bin/docker-entrypoint.sh: line 9: /root/scripts/cardano_node/run_cardano_node_testnet.sh: No such file or directory
[INFO tini (1)] Spawned child process '/usr/local/bin/docker-entrypoint.sh' with pid '7'
[INFO tini (1)] Main child exited normally (with status '127')
There seems an issue with the mounted share folder.
I can see a "+" at the end of your permission, what indicates that its mounted. but I miss this on my folder.
yours
drwxrwxrwx+ 4 codespace root 4096 Nov 25 16:01 shared
mine
drwxr-xr-x 4 node node 4096 Nov 25 14:00 shared
will try to expose the chmod permission for my shared folder to 777 as yours and try it again. but I don't think this will help.
I have had shells act differently based on how I entered in the volume mount command in the past when I was using docker run, but I thought by using docker compose, the compose engine would take care of it. In the yml file, try to use an absolute path instead of a relative one and let me know if that works. If so, I'll update the project to use an absolute path instead.
For example, use: /${PWD}/shared/:/mnt/shared
instead of just ./shared:/mnt/shared
/${PWD}/shared/:/mnt/shared
Tried it, but didn't solve the issue.
Changed the permission to 777, but still the same.
Tried my image with codespace and it works. I assume it has something to do with the missing "+" (drwxrwxrwx+) on my shared folder. I think the mnt permission "+" came with the building of the image, but I'm not sure.
Will try to build the image on my local host, but the last time I did, it failed, because of to little memory.
Tried to build it again on my local host, but as the last time, it failed with "not enough memory", at this point in the dockerfile:
executor failed running [/bin/sh -c cd ~/cardano-src/cardano-node && cabal build all]
#16 2010. cabal: Failed to build plutus-core-0.1.0.0 (which is required by
#16 2010. exe:plutus-example from plutus-example-1.29.0, test:cardano-api-test from
#16 2010. cardano-api-1.29.0 and others). The build process was killed (i.e. SIGKILL).
#16 2010. The typical reason for this is that there is not enough memory available (e.g.
#16 2010. the OS killed a process using lots of memory).
#16 2010.
------
executor failed running [/bin/sh -c cd ~/cardano-src/cardano-node && cabal build all]: exit code: 1
ERROR: Service 'node' failed to build : Build failed
Do you have over 15GB of disk space available on your computer? That's roughly the size of the docker image. If so, have you configured Docker correctly for this particular image to utilize that much space. For example, when using Docker Desktop on Windows, I believe there is an option to expand the amount of space an image/container uses.
Its not the disk space, its the memory. The building of the image needs almost 8 GB RAM and that's the problem on my local host.
I don't get it fixed. I would like to work with your sandbox, but I need to get this mounting issue solved. Tried different options, but didn't help me.
# - /workspaces/cardano_docker_sandbox2/shared:/mnt/shared
# - ${PWD}/shared/:/mnt/shared
- ./shared/:/mnt/shared
I pushed my dev environment (VS DevContainer) in this repo If you like, you can take an eye on it. The docker-compose.yml pulls an image which was built with your dockerfile.
The binding looks good. I don't understand, why my /mnt/shared directory is empty. Inspect
"HostConfig": {
"Binds": [
"/workspaces/cardano_docker_sandbox/shared:/mnt/shared:rw"
],
Best Regards, Dirk
Let me recap the issues your having so I can make sure I understand. Your issues are:
Are you still having issues with problem 1? If so, how are you getting past this to even know you have a mounting issues?
What OS is your local host running?
What version of Docker are you running? Is it Docker Desktop if your running it on Windows?
What shell are you using to build the Docker image?
Also, you have in your last message that you have tried ${PWD}/shared/:/mnt/shared
, but it should be /${PWD}/shared/:/mnt/shared
.
I'll try to help you, but it's difficult since I am not able to replicate the issue on my end.
You run out of RAM space on your local host for building the image
yes
The shared directory won't mount to your container environment
yes
Are you still having issues with problem 1?
yes
If so, how are you getting past this to even know you have a mounting issues?
I got it to work on my codespaces with your dockerfile and was able to create an own image, which I would like to use on my local host.
I can run the up.sh script, but the container won't run.
node ➜ /workspaces/cardano_docker_sandbox (dr-cardano-node ✗) $ ./up.sh [+] Running 1/1 ⠿ Container cardano_docker_sandbox-node-1 Started 0.5s Error response from daemon: Container edd10558c8b25bf234b75c188800140665236e9686c227cfdd735111c299a85e is not running
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
80a966f7ee8d draschke/cardano_sandbox_img:latest "/usr/bin/tini -v --…" 10 hours ago Exited (127) 10 hours ago cardano_docker_sandbox-node-1
If I run th container interactive I can see that there is no "shared" folder
Executing task: docker run --rm -it draschke/cardano_sandbox_img:latest <
[INFO tini (1)] Spawned child process '/usr/local/bin/docker-entrypoint.sh' with pid '8' root@b0c7d71bbd7a:~# ls -la total 32 drwx------ 1 root root 4096 Nov 25 16:35 . drwxr-xr-x 1 root root 4096 Nov 30 19:29 .. -rw-r--r-- 1 root root 3106 Dec 5 2019 .bashrc drwxr-xr-x 1 root root 4096 Nov 25 16:10 .cabal drwxr-xr-x 1 root root 4096 Nov 25 16:06 .ghcup drwxr-xr-x 1 root root 4096 Nov 25 16:35 .local -rw-r--r-- 1 root root 161 Dec 5 2019 .profile drwxr-xr-x 1 root root 4096 Nov 25 16:35 cardano-src
What OS is your local host running?
PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian
What version of Docker are you running? Is it Docker Desktop if your running it on Windows?
Docker version 20.10.11, build dea9396 Docker Compose version v2.2.1 docker-compose version 1.29.2, build unknown docker-py version: 5.0.3 CPython version: 3.7.3 OpenSSL version: OpenSSL 1.1.1d 10 Sep 2019
What shell are you using to build the Docker image?
Also, you have in your last message that you have tried ${PWD}/shared/:/mnt/shared, but it should be /${PWD}/shared/:/mnt/shared.
I did it right now again, but the same.
I'll try to help you, but it's difficult since I am not able to replicate the issue on my end.
If you like use my .devcontainer this is my dev environment.
Thank you for your time!
Hi Austin,
thanks for your great work, that's really impressive. I followed your description on my gh codespace and was able to build the image and got the sandbox container to run successfully.
Because I would like to work with this already created image on my local host (is a lame duck), I pushed my image to [docker hub] (https://hub.docker.com/r/draschke/cardano_sandbox_img) and pulled it on my local host.
Now if I try it to run it on my local host, I get this message and the container is not running. [INFO tini (1)] Spawned child process '/usr/local/bin/docker-entrypoint.sh' with pid '8' [INFO tini (1)] Main child exited normally (with status '1') [INFO tini (1)] Spawned child process '/usr/local/bin/docker-entrypoint.sh' with pid '7' [INFO tini (1)] Main child exited normally (with status '1')
I only changed the .yml file a little bit. (rm build and replaced it by my image) docker-compose.yml
I have not a clue why the container won't work. Any ideas?
Thanks for your help & best Regards Dirk