Docker compose debug with --no-deps option

Answered

I am trying to create a debug profile with docker-compose up in pycharm.
Under the command and options this is what I have as a default: up  --exit-code-from web --abort-on-container-exit web

On adding the option --no-deps, it does not recognize the command option and would not let me add it. This is essential to me as every time I run the debug, it stops and recreates the dependent containers for web.

Has anyone found a solution to this?

1
7 comments

Hi,

So you would like to keep your linked containers inactive?

From what I can see, if you add run to Command and options it will run it with --no-deps automatically.

0
Avatar
Permanently deleted user

It's actually because I don't want my dependent containers to be recreated every time I run debug on Pycharm. I tried using the run command, it does run with the --no-deps option but seems to set the port on its own and won't let you run with the --service-ports flag. Also, using run instead of up does not create the dependent containers if they're not already created.

0

Did you specify it like this?

It seems that up command doesn't have --service-ports flag

0
Avatar
Permanently deleted user

Yep. I got the following error message when running the debug: ERROR: Service port mapping and manual port mapping can not be used together

0

Looks like there is a bug with this flag, because PyCharm automatically adds -p flag and thus causing the conflict in ports binding.

We'll investigate it.

I'm sorry for inconvenience.

0

I think you could try using -p flag, without using --service-ports

Something like:

0
Avatar
Permanently deleted user

That seemed to work. Thank you!

0

Please sign in to leave a comment.