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

New feature request: Add support for a containerId property #412

Closed
niriak opened this issue Mar 21, 2016 · 7 comments
Closed

New feature request: Add support for a containerId property #412

niriak opened this issue Mar 21, 2016 · 7 comments

Comments

@niriak
Copy link

niriak commented Mar 21, 2016

Please add a configuration option for the goal docker:start to provide a maven project property name the containerId is stored into. I'd like to run some integration tests using docker-java client with the container setup done by the docker-maven-plugin.

E.g. in the configurations's run section a new tag containerIdProperty:

<run>
   <containerIdProperty>containerId</containerIdProperty>
</run>

The maven project property containerId will contain the id of the new generated container. This property can now be used in the maven-failsafe-plugin to pass the containerId to Java.

@rhuss
Copy link
Collaborator

rhuss commented Apr 1, 2016

IMO that makes sense, maybe we can make it a bit more generic, too (don't like long property names so much ;-)

My suggestion would be

<run>
   <defineProperties>
       <containerId>myPropertyName</containerId>
       <!-- Maybe later other meta data like the "name" or "startDate", stuff which 
             is available from "docker inspect" -->
   </defineProperties>
</run>

We could also implicitly set properties after some conventions like docker.container.<alias | image name>.id automatically. I'm not so much a big fan of this because it couples the alias/image name to the code where it is used implicitly, so changing an name/alias would need to update the code, too but there is no direct reference whether the implicitly used property is ever used.

wdyt ?

@niriak
Copy link
Author

niriak commented Apr 5, 2016

The variant with the defineProperties tag sounds good to me.

@niriak
Copy link
Author

niriak commented Jun 7, 2016

Please add a property "containderId" to the list of specific properties which are exposed as Maven properties. E.g.: "docker.container.tomcat.containerId".

See also https://fabric8io.github.io/docker-maven-plugin/docker-start.html

@rhuss
Copy link
Collaborator

rhuss commented Jun 7, 2016

Sorry, forgot this issue. will be available in the next release.

@niriak
Copy link
Author

niriak commented Jun 7, 2016

Ups, got your answer to late. Already send a pull request.
Sorry, I'm a newbie - how to proceed now?

@rhuss
Copy link
Collaborator

rhuss commented Jun 7, 2016

No problem. The release is underway, you will be able to use 0.15.5 in about half an hour.

@niriak
Copy link
Author

niriak commented Jun 7, 2016

Thanks a lot!

@rhuss rhuss closed this as completed Jul 7, 2016
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