-
Notifications
You must be signed in to change notification settings - Fork 642
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 mapping parsing issue #273
Comments
even if you could trigger the plugin to use a random port w/o specifying i'm not sure this is going to be possible but @rhuss may have a suggestion i haven't thought of. |
actually - if you wrote your own handler, couldn't you just handle this there once you've parsed the yaml file and extracted the port? you could build the port stanza you still need to solve where your handler would get the property name from, but you could store this in a label that your handler would know to read for this value. |
@jgangemi - thanks for the quick response! with regards to using a random port w/o specifying for our problem of how to get the property name, that's the main problem we are running into... we've tried the following:
this seems messy because the mapping is separate from the docker compose yaml file so we will need to make sure the files are kept in coordination. there is also an implicit naming convention we have to assume (we parse the first part of the property name to be the service name in order associate the property with the correct image's port) both solutions we've tried seem less than ideal :( hoping others have run into similar problems and might have a nice clean solution? |
One suggestion is to allow dynamically assigned ports in d-m-p without associated properties and then compute property names where to put the assigned port into. E.g. sth like Would this help ? |
btw, we plan to support docker-compose natively (#57). 'would be super cool if you could contribute your docker compose external config handler somehow ;-) |
👍 for contributing back the external handler. @rhuss's suggestion about dynamically creating property names based upon some known pattern is also what i came up w/ while thinking about this as well. |
@rhuss - yup, the ability to allow dynamically assigned ports in dmp without associated properties would be nice. we are working out a few possible ways to compute the property names now. we may be interested in helping contribute back some of our docker compose handler stuff but we are still working out the kinks :) |
isn't this what the |
Hi
We have written an external configuration handler to read Docker Compose yaml files so we can use the same yaml files in our maven builds as we do when we use the Docker Compose CLI. But we are running into a few issues related to how the docker-maven-plugin works with the port mappings.
Do you have any suggestions on how we can continue to use the docker-maven-plugin, but with a Docker Compose yaml file that is supported in 1.4. We do want access to the random host port assigned to our service so the mapping to the maven property gives us that, but then prevents us from using the same yaml file for both maven builds and Docker Compose CLI.
Thanks
The text was updated successfully, but these errors were encountered: