Docker. Ports are not available. An attempt was made to access a socket in a way forbidden by its access permissions

142 Views Asked by At

(HTTP code 500) server error - Ports are not available: exposing port TCP 0.0.0.0:54322 -> 0.0.0.0:0: listen tcp 0.0.0.0:54322: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

What could be the core problem in my case when I'm trying to run the app which hasn't been touched for several months? When I'm trying to run postgres container i see this notification with error.

Project structure Docker container

Here is the instruction: Launch Locally for development

  1. Copy app.env.example to app.env. Fill it out
  2. At the root, write docker-compose up. When changing the package.json or yarn.lock' must be restarted with the docker-compose up --buildflag for reassembly. To install the new package innode_modules'.
  3. On the local machine, go to the app folder, and make a yarn install there. This is necessary so that the IDE can prompt. because inside the docker container there is its own folder node_modules, which is in no way related to the one that is available on the local machine. This is necessary because the encoder uses Linux, and our local machines may have windows/mac os installed, and they will need different packages.
  4. Write code. It is pushed to ports nodejs - 30000, postgres - 54322

If somebody knows a method, please share it, cause it's been a week already since I try to fix this error.

0

There are 0 best solutions below