Closed klicki closed 3 years ago
Hi @klicki
thanks for reporting that issue.
Could you please tell me when exactly you get this error and with which version of the docker image? I've just tried to spin up the latest version and it was working fine for me.
$ docker image inspect klausmeyer/docker-registry-browser:latest | grep -E 'Id|Created'
"Id": "sha256:a46deff084a07d4c7ab2def7194db116d293e71c6bed840603b469d611205a61",
"Created": "2021-07-28T07:32:40.291480933Z",
Looks like the automated builds haven't worked for about two months so the latest tag isn't really up to date - but that's another topic I have to check.
Thanks, Klaus
Hi, I'm back in the office now. Thanks for the friendly reply.
I started the container the recommended way: sudo docker run ... klausmeyer/docker-registry-browser which shows: "Id": "sha256:a46deff084a07d4c7ab2def7194db116d293e71c6bed840603b469d611205a61", "Created": "2021-07-28T07:32:40.291480933Z",
What does Could not find a JavaScript runtime. mean for me? For now the container doesn't start. :(
BTW: The output above is from docker logs.
Thanks for the answer.
What does Could not find a JavaScript runtime. mean for me?
I'm really wondering why you get this error (looks like even with the same version of the image as I tried it).
The JavaScript runtime should be only required when building the image and I'm including nodejs for that.
Not sure if it helps but I've fixed the automated builds in the meantime and there is a newer image available so maybe you could give it a try with docker pull klausmeyer/docker-registry-browser:latest
and then do the docker run [...]
again.
I used the latest image: "Id": "sha256:cba3ffba7d5457b968fed4225a67836e85b6655e5331f510c93223f67b4b233a", "Created": "2021-09-17T21:27:58.241114658Z",
The message remains the same:
! Unable to load application: ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
/usr/local/bundle/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /usr/local/bundle/gems/execjs-2.7.0/lib/execjs.rb:5:in
This is confusing, at least for me.
This is confusing, at least for me.
Also for me ... I just tried with the latest tag as well and it's working fine.
Could you share a few details about on what system you're trying to run the image?
$ cat /etc/os-release
$ uname -a
$ docker version
Also interesting for me would be the output of:
$ docker run --rm -u root klausmeyer/docker-registry-browser:latest sh -c "apk update && apk add file && which node && file \$(which node)"
More data:
PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)"
Linux tool-server 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux
Client: Docker Engine - Community Version: 19.03.12 API version: 1.40 Go version: go1.13.10 Git commit: 48a66213fe Built: Mon Jun 22 15:45:50 2020
The "docker run ..." command creates a -bash: $: Kommando nicht gefunden.
Maybe you have mounted the Java Runtime and I didn't?
More data: [...]
That's all looking good so far.
The "docker run ..." command creates a -bash: $: Kommando nicht gefunden.
It looks like if you'd have included the $
at the start of line when copy & pasting the command.
Could you please try without?
docker run --rm -u root klausmeyer/docker-registry-browser:latest sh -c "apk update && apk add file && which node && file \$(which node)"
This is what I get on a Debian 10 machine (although with newer docker - but that shouldn't make a difference):
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
v3.14.2-44-g417ec972c6 [https://dl-cdn.alpinelinux.org/alpine/v3.14/main]
v3.14.2-42-gf168ad374f [https://dl-cdn.alpinelinux.org/alpine/v3.14/community]
OK: 14939 distinct packages available
(1/2) Installing libmagic (5.40-r1)
(2/2) Installing file (5.40-r1)
Executing busybox-1.33.1-r3.trigger
OK: 76 MiB in 51 packages
/usr/bin/node
/usr/bin/node: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped
The /usr/bin/node
should be the JavaScript runtime - so I'm really wondering why it is complaining on your end about it being missing. That file should be shipped within the docker image.
😳 Sorry for the $, how embarrasing...
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz v3.14.2-44-g417ec972c6 [https://dl-cdn.alpinelinux.org/alpine/v3.14/main] v3.14.2-42-gf168ad374f [https://dl-cdn.alpinelinux.org/alpine/v3.14/community] OK: 14939 distinct packages available (1/2) Installing libmagic (5.40-r1) (2/2) Installing file (5.40-r1) Executing busybox-1.33.1-r3.trigger OK: 76 MiB in 51 packages /usr/bin/node /usr/bin/node: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped
Not a problem :) That's also looking good - I'm getting out of ideas what to check.
There might be anything blocking the node
binary to be executed inside the container.
You could test it like this:
docker run --rm -u root klausmeyer/docker-registry-browser:latest node -e "console.log(42);"
Things you could check on your docker host:
42
no red flags
Just a few complaints about docker0
Sep 20 15:56:43 tool-server kernel: [9685365.933192] docker0: port 2(vethf717224) entered disabled state Sep 20 15:56:43 tool-server kernel: [9685365.940162] device vethf717224 left promiscuous mode
I'm running out f options, too. It is not possible to reboot the server or things like that, because some software with customer relevance is running.
Other containers like https://github.com/fossology/fossology work like a charm. Maybe I can find a different server and have better luck there, but due to the project situation we are rather tight with resources. ;-)
Thank you very much so far! I'll let you know if I'm stumbling over a solution.
Carsten
The docker container seems to miss a few components: