-
Notifications
You must be signed in to change notification settings - Fork 40
Publishing ports #10
Comments
Just fixed this in 26c6091 |
Also, you'll need to use the master branch as I haven't packaged it yet |
Great stuff @johnewart. Thanks again! |
@johnewart I've updated my gem using the master branch, but the results are the same, using this
Am I doing something wrong? Thanks in advance |
If you don't use the :command option, then nothing will be running, so it won't execute the final docker run with -p. What recipe are you running, etc? |
Im using a recipe created by me to provision the created container with a node.js app, and on the command option im trying to init my app like this
The recipe works, it installs everything inside the container, and runs the desired command, but still no ports |
Yeah you want something that does not daemonize; what's your complete recipe look like now? |
Currently, its looking like this:
|
Try including the full paths when running -- like /usr/local/bin/node /path/to/app.js |
Even though I use only "node", the process ends, and thats why (I think) I don't see the published ports
When I manually create a container with the same "node" command, it remains open
Is this the expected behaviour? |
Yes, if the process ends then the container stops, what is the output from your chef run with -l debug? (can you make a gist of it?) |
https://gist.github.com/matiasdecarli/5a34c9cd0ab5f592aec7 Just for speed purposes I commented the recipe thats done inside the container |
I can see that it runs
When it should run
Is this correct? Tested this on bash it works like charm. |
Interesting, -i attaches STDIN, right? Why would node care if there's STDIN attached? |
Right, the help says
Don't know why, but seems as the right way to do it. Either way, It will be great to have the opportunity to have this as a parameter, don't you think? I don't have much Ruby experience, but think I can make a pull request regarding this |
I'll just make a flag :keep_stdin_open => true since it seems like others may need this |
Added in 5a4ccd7 |
Great! Worked as expected. Thanks! |
Ok ,Im going to comment again on this issue. Using this
We are forcing to have the same port on both host and client. Docker gives us the possibility to pass 1 or 2 ports to have host_port:container_port, which will be a very useful feature. Also will enforce the Docker syntax compatibility. I actually made a pull request for this |
Hi guys!
Maybe this is a silly question, but... is there is any option to publish a port?
The idea is to obtain something similar to this
The text was updated successfully, but these errors were encountered: