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

port forwardings in docker-compose.yml are not activated via dip #142

Closed
hachi8833 opened this issue Dec 5, 2021 · 2 comments
Closed

port forwardings in docker-compose.yml are not activated via dip #142

hachi8833 opened this issue Dec 5, 2021 · 2 comments

Comments

@hachi8833
Copy link

hachi8833 commented Dec 5, 2021

Describe the bug

I found the following difference in the behaviors between docker-compose and dip.

  • 1: normal docker-compose command:
    • PORTS: 0.0.0.0:3000->3000/tcp, 0.0.0.0:9229->9229/tcp
  • 2: dip command
    • PORTS: (empty)

To Reproduce
Steps to reproduce the behavior:

  1. Check https://github.com/hachi8833/dip_issue and README to reproduce the issue

Expected behavior

I expect that dip activates the port forwarding configs in docker-compose.yml.
I need to specify the explicit HOST env as 0.0.0.0 to expose the port for nuxt-app, but this can't be used via dip.

Screenshots

image

image

Context (please complete the following information):

  • OS: macOS Big Sur (11.6)
  • Docker Desktop 4.2.0 (70708)
  • dip: 7.2.0
  • Ruby: ruby 3.0.3p157

(I'm wondering if I took a mistake or something...)

Best regards,

@bibendi
Copy link
Owner

bibendi commented Dec 5, 2021

Hi!
Dip executes commands through docker compose run so that you need to define compose: run_options: [service-ports] for the sh command if you need ports to be opened.

@hachi8833
Copy link
Author

It works now as you suggested! Thank you very much🙏

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