Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker-compose run menu option missing

I have a solution with docker compose support added. After I add the support in the run dropdown I have the option to run project with docker compose.

Docker compose appears as a node in the solution tree.

enter image description here

However, if I clone code from repo the docker-compose node is there but it is not an option under the run menu. Also this happens sometimes randomly where I open existing proect and the option to run with docker compose has gone but the node is still there. It also happens when switching branches.

enter image description here

To fix this I have to delete the docker-compose node and then re-add support and select option to not overwrite files. Then the option appears again.

Why is this happening? Why does docker compose node in solution explorer show but the run option isn't there? In both situation the dockerfile run option is there but not the compose option.

like image 356
Guerrilla Avatar asked Apr 01 '19 16:04

Guerrilla


People also ask

What is the difference between Docker compose up and Docker compose run?

The key difference between docker run versus docker-compose is that docker run is entirely command line based, while docker-compose reads configuration data from a YAML file. The second major difference is that docker run can only start one container at a time, while docker-compose will configure and run multiple.

How do I run Docker compose in detached mode?

Run Docker Compose in detached mode by passing the -d flag to docker-compose up . Use docker-compose ps to review what you have running.

How do I run a specific service in Docker compose?

To start (up), stop, restart or build a single service (container) using the Docker Compose, simply specify the name of the service against which to run the corresponding docker-compose command.


1 Answers

Right click 'docker-compose' in solution explorer and 'set as startup project'.

like image 124
rathga Avatar answered Nov 15 '22 04:11

rathga