I have tried moving the lines around, but it only gives me new errors. It may be an indentation or something simple like that, or it may be that I got it all totally wrong. Not to mention that I haven’t found out how to use the “from” and “user root” correctly. Does somebody have the time to help me? I hope this is simple for somebody who knows what they’re doing, which I dont…
Thanks for answering! That’s what I tried, but I couldn’t get it working. And I suspected indentation, thanks! I get as far as trying to pull now, but that gives me the error:
✘ signalk-server Error pull access denied for si... 1.6s
Error response from daemon: pull access denied for signalk-server, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
The first commands in the message, can they be the problem? Can you tell me how I implement them?
And I was hoping that I could build in the compose file, like I have installed stuff in another file, but that’s not possible, then? It’s to get port 80 working as the GUI port (I have it over the web as well, so it creates problems using other ports). You may remember that you said that was possible, but the developer says:
But I think I am starting to understand a bit more now. I have read about Dockerfiles, and I see that they are instructions for the build. So where whould I put that dockerfile? Do I need to find out where the images are pulled to?
# network = default bridge
me@docker:~$ docker run -it --rm -u 111111 -p 80:80 python python3 -m http.server 80
Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...
^C
Keyboard interrupt received, exiting.
me@docker:~$ docker run -it --rm -u 111111 --network host python python3 -m http.server 80
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/local/lib/python3.12/http/server.py", line 1314, in <module>
test(
File "/usr/local/lib/python3.12/http/server.py", line 1261, in test
with ServerClass(addr, HandlerClass) as httpd:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/socketserver.py", line 457, in __init__
self.server_bind()
File "/usr/local/lib/python3.12/http/server.py", line 1308, in server_bind
return super().server_bind()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/http/server.py", line 136, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/local/lib/python3.12/socketserver.py", line 473, in server_bind
self.socket.bind(self.server_address)
PermissionError: [Errno 13] Permission denied
So apparently he is right when --network host is used. Which would make sense, as the contaiener joins the network namespace of the host, and therefor all restricts on network level also apply for the container.
But now I’m up and running on port 80! Thank you very much for your help! This is the final Docker Compose file, in case I should happen to delete it without having a backup (unlikely with my compulsive backup habits, but still…):
You may certainly ask, and the answer is that you are mistaken (at least according to the developers of SignalK and I would assume they know what they are talking about). The node user is the default one used, and I am building an image running the root user to finally expose port 80 in host network mode.