Invalid Docker Compose File

Hello! In trying to set up the server we had our IT department enable certain ports, resulting in an error that looks like this:


We got this error both before and after modifying the docker-compose file to account for the different port numbers, and haven’t been able to find a solution online. Does anyone know what might be going on here?

Hi,

<port_…> are placeholders that should be filled with the correct numerical values. The error message tells you what format it should be.
For reference check https://docs.docker.com/compose/networking/

Cheers
Fabian

Please follow the instructions here: https://www.mobile-coach.eu/docs/installation/server/setup/#install-letsencrypt-certificates--updating-config-files and you will be asked for the ports of the host machine that are open and free. Ports in the yml file to the right of “:” are ports where the services would be running inside the containers and they need/should not be changed.

Thanks for the help! I updated that and was able to get past it no problem. I have another error now though that I’ve been banging my head against a wall with if you could take a look at it.

I don’t know if this is an error I should be expecting, working through this tutorial but I didn’t see any mentions of it, or find anything helpful online.

Hey,

Great to hear the other issue got resolved.

Regarding the docker issue:
Is docker installed?
What do the commands docker info and docker ps print?
Try docker service restart.
Another thought: If docker daemon is running under with super user permissions (sudo), also other docker commands need to run with super user permissions. That’s a common cause for this issue. Definitely try to make sure the docker commands run, e.g. running.

Hope this helps and relieves your headache!

Cheers
Fabian

Both docker info and docker ps both print a “permission denied” when run without sudo; run with sudo the give an “ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?” We do have docker installed (version 20.10.5) but it doesn’t seem to recognize docker service restart as a valid command, getting us this output:

Hi,

Sorry, the command was service docker restart. If that doesn’t work, look for “how to restart docker daemon on {your OS}.”

What is the output of ls -l //var/run/docker.sock?

I think docker wasn’t installed properly (permissions most certainly wrong, your user is not in the docker user group or something in that direction) and that’s nothing we can help you with or support you with. You need to contact your IT department and/or use public resources (Google, StackOverflow) to fix your docker setup.

Cheers
Fabian

Nothing seems to happen when I restart the docker daemon, as we end up with the same result. The output of ls -l //var/run/docker/.sock is “srw-rw---- 1 root docker 0 Apr 15 13:30 //var/run/docker.sock”. I’ll go ahead and contact our IT department to let them know.

Thanks for all your help so far–I think we’re super close to getting this figured out. I just wanted to verify the meaning of a particular docker issue I’m seeing:


My understanding here is that it’s trying to assign nginxservice_1 to port 443, which is the same port being used by another service. This confused me a bit though, since after reading through the docker-compose code on the mobilecoach bitbucket, it looks like tomcatservice adn nginxservice_1 are both SUPPOSED to be mapped to the same virtual port–unless this is an issue of 443 already being used on the physical ports? Do you know why this might be happening? Should we be opening another physical port, and thus have them share a virtual port but not a physical one, or am I misunderstanding?