Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose Not Working #13

Open
atb-brown opened this issue Jan 21, 2021 · 1 comment
Open

Docker Compose Not Working #13

atb-brown opened this issue Jan 21, 2021 · 1 comment

Comments

@atb-brown
Copy link

My apologies in advance, but I'm not a Docker expert. But following the outline in this project's readme doesn't result in a running service for me right now.

When running docker-compose up, I get the following output with an error:

$ docker-compose up -d
WARNING: The following deploy sub-keys are not supported and have been ignored: update_config, restart_policy.delay
Creating spring-boot-mongo-docker2_mongo_1 ... done
WARNING: The "springboot" service specifies a port on the host. If multiple containers for this service are created on a single host, the port will clash.
Creating spring-boot-mongo-docker2_springboot_1 ...
Creating spring-boot-mongo-docker2_springboot_1 ... done
Creating spring-boot-mongo-docker2_springboot_2 ... error

ERROR: for spring-boot-mongo-docker2_springboot_2  Cannot start service springboot: driver failed programming external connectivity on endpoint spring-boot-mongo-docker2_springboot_2 (0de9d86e641a3499f3647fd1636842995eb7d19745cfa62e
541f56dad5b9525e): Bind for 0.0.0.0:8080 failed: port is already allocated

ERROR: for springboot  Cannot start service springboot: driver failed programming external connectivity on endpoint spring-boot-mongo-docker2_springboot_2 (0de9d86e641a3499f3647fd1636842995eb7d19745cfa62e541f56dad5b9525e): Bind for
0.0.0.0:8080 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

It seems to be complaining that 0.0.0.0:8080 is already being used, but I used a TCP port viewer and that doesn't seem to be the case on my computer.

@ramazansakin
Copy link

Hi @atb-brown ,

As you see at the docker-compose file, 2 instances of the app are trying to run on the same port and then one of them can not run. You can simplify the compose file like this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants