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

support for specifying local bind address #39

Closed
wants to merge 2 commits into from

Conversation

jgangemi
Copy link
Collaborator

adds the ability to specify what ip address the container should bind to, eg:

docker run -p 127.0.0.1:8080:8080 ...

i want to use the plugin to do actual deployments into docker and have a use case where an app needs to listen on a separate interface, so i need to be able to specify an ip.

it also cleans up some compiler warnings and swaps the test ares so they are 'expected/actual' :)

- cleaned up compiler warnings
- swapped test args so it's 'expected/actual'
@rhuss
Copy link
Collaborator

rhuss commented Oct 25, 2014

Thanks a lot! I'm currently on vacations and will be back in a week. When I'm back I'll review the pull request ASAP.

@jgangemi
Copy link
Collaborator Author

welcome!

question as i'd like to contribute some more functionality...

how tied are you to using the org.json library vs moving to an actual java client (i like the looks of the https://github.com/spotify/docker-client over https://github.com/docker-java/docker-java in terms of simplicity) to handle that portion of the heavy lifting?

@rhuss
Copy link
Collaborator

rhuss commented Nov 2, 2014

I intentionally decided against using a Java access library. Typically this is not the proper way but since Docker is moving so fast it is better to have less dependencies.

I.e. it took quite some time for docker-java to catch up with the latest Docker 1.3.0 introduced mandatory SSL communication. I could react much faster here.

Also, I need only a fraction of the possibilities offered by the Docker remote API and the 'heavy lifting' is not so heavy (yet).

And finally in order to fully control remote API's chunked encoding and streaming (e.g. for providing a progress bar) I need low-level access anyways.

So, in order to answer your question: Yes, I'm tied to using a low-level (direct) API ;-)

What kind of functionality do you have in mind ?

@rhuss
Copy link
Collaborator

rhuss commented Nov 2, 2014

Added it to 0.10.x and did some refactorings on the way.

@rhuss rhuss closed this Nov 2, 2014
@jgangemi
Copy link
Collaborator Author

jgangemi commented Nov 3, 2014

sorry for the late response, i was away myself...

aside from naming the container (which is a query param anyway), i'm not entirely sure what other functionality just yet. i've only started using the plugin but i'm going to want to be able to do push button deploys, etc out of jenkins and just wanted to get a sense of your general plan should more of that heavy lifting become necessary.

also - did this make it into master? i don't see the changes.

@rhuss
Copy link
Collaborator

rhuss commented Nov 3, 2014

Sorry, forgot to push yesterday evening. I moved the PortMapping configuration into the access package in order to keep the access API's signature smaller.

We need still to update the documentation (in the README.md, section Dynamic Portmapping), but I have to update the whole documentation anyways.

leusonmario pushed a commit to leusonmario/docker-maven-plugin that referenced this pull request Aug 18, 2018
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

Successfully merging this pull request may close these issues.

2 participants