Blank Page with downloaded binary.
See original GitHub issuecode-server
version:code-server1.939-vsc1.33.1-linux-x64.tar.gz
- OS Version: Linux running in docker image php:7.3-apache (debian-slim), hosted on RHEL 7.6
Description
When using the Binary download in separately build docker environment. I get a blank web page. I am sure there is something missing in the environment that the binary needs, Perhaps access to other files from the source image, or some library, but there is no error report that helps determine the problem, or any ‘requirements’ outlined as needed for the binary.
On the other hand if I use the docker image they provide as a straight docker run image, it works fine. But I need to be able to run multiple copys of code-server in a docker swarm (seperated multiple-users for a class environment), meaning I need to run it as a ‘service’ in a swarm environment. Which is why I am trying to create my own docker image.
In summary: The binary in a swarm works, but gives a blank page, and the pre-build docker image does not work in a swarm.
Steps to Reproduce
Example… Start a php:7.3-apache service in a docker swarm. Run a BASH command line into that docker container (not as root), to download, install, and run in background; the latest binary code-server.
curl -s -L https://github.com/codercom/code-server/releases/latest |
grep download | grep tar.gz |
sed '2q; s%.*href="%https://github.com%; s/".*//' |
xargs curl -s -L -o - | tar zxvf -
mv code-server*/ code-server
chmod +x code-server/code-server
code-server/code-server -d ~/code-server ~/html --no-auth --allow-html -p 8080 &
At this point I can connect to the code-server web page on port 8080, via the swarm ingress-nginx proxy (which currently allows http on 80, and 8080, and https on 8443). But I only see a blank page.
Same if I remove the option --allow-html -p 8080
and connect via https on port 8443
The blank page is why I theorize the provided binary requires something MORE that is not documented, or provided in the tar file for the binary.
I also see the following error, from the command line connection to the php:7.3-apache
docker service
Error: ENOENT: no such file or directory, open '/home/travis/build/codercom/code-server/packages/server/build/web/index.html'
Which presumably is the path to the build directory of the provided binary, which is NOT present, in the tar file of the binary, or is effected by any option I have tried.
I have seen a similar error in the provided docker image…
Error: ENOENT: no such file or directory, open '/src/packages/server/build/web/index.html'
which does match the build directory used in the ‘Dockerfile’ (and is still present in the image) that was used to build that docker image.
It is very frustrating.
Addendum… Looking at the processes, running the code-server binary will then run another code-server sub-process with a Source directory path as the first argument, along with ‘development’ command line options. Again no option seem to effect or change this non-existent hard-coded ‘path’ from being included.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:16
I’m also getting the `Error: ENOENT: no such file or directory, open ‘/src/packages/server/build/web/index.html’ when I run the provided docker image on a ubuntu 18.04 server, but not when I run it on my Arch dev machine …
I’m able to reproduce it when running behind a reverse proxy as well - running the image (in docker) I can connect if I go directly to the exposed port, but when accessing it at a context (abc.com/editor/) I get:
EDIT: It was a bit of a pain to get setup right - mostly on the DNS side - but I did find that running at a subdomain does work fine - so ‘editor.abc.com’ works which means it shouldn’t be related to any of the network hops (router, rev.proxy, etc)