Closed achso18 closed 1 year ago
Huh, that's an odd one and not something I've encountered, thanks for sharing the solution!
Are you running on windows? And on the latest 1.8.3 version of opentopodata?
Also would you mind trying with the alternative image (it's called m1, but should work on any platform):
docker build --tag opentopodata --file .\docker\apple-silicon.Dockerfile .
docker run --rm -it --volume /opentopodata/data:/app/data:ro -p 5000:5000 opentopodata
I'm stumped by the issue, but that would at least indicate if there's something wrong with supervisord/dependencies or with docker (the two images use the same approach to launching the service, but use different base images and dependency versions).
Hey Andrew. Thanks for the quick reply. Yes, it is quite buffling, but I think, I found the reason. I tried the other Dockerfile, but also without success.
Although, executing the cmd directly on the command line works just fine. So it must have something to do with the run.sh
file.
So, I am on a Windows machine with Docker Desktop and VSCode.
I remembered some stupid error I once had before...
Writing bash scripts in VSCode and then trying to execute them on a Linux VM. The error then had also nothing to do with the actual problem: it is the line endings!
As soon as I changed them to "LF", it worked like charm 😃
Ok good to know thanks!
I'm not familiar with windows, but it wouldn't surprise me if some tools can handle linux-style line ending and others can't.
I am building the docker image using the provided Dockerfile like so
docker build --tag opentopodata --file .\docker\Dockerfile .
When trying to run the container with the docker run command:
docker run --rm -it --volume /opentopodata/data:/app/data:ro -p 5000:5000 opentopodata
I get the following error:
I tried with different commands in the
run.sh
file but it is always complaining about missing files. I checked in the container and they are definitely there.Modifying the docker run command in such a way starts up the server successfully:
docker run --rm -it --volume /opentopodata/data:/app/data:ro -p 5000:5000 opentopodata sh -c "exec env N_UWSGI_THREADS=2 /usr/bin/supervisord -c /app/docker/supervisord.conf"
Any idea what could be wrong?