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

volume from doesn't appear to work #73

Closed
taylodl opened this issue Dec 29, 2014 · 4 comments
Closed

volume from doesn't appear to work #73

taylodl opened this issue Dec 29, 2014 · 4 comments
Assignees
Milestone

Comments

@taylodl
Copy link

taylodl commented Dec 29, 2014

I start a maven container and give it the name 'maven' using docker's --name option. In my pom.xml I've configured my image as follows:

<image>
   <name>taylodl/wls-mydomain</name>
  <run>
   <volumes>
      <from>maven</from>
   </volumes>
         .
         .
         .  

When I run maven I get the following error:

[ERROR] Failed to execute goal org.jolokia:docker-maven-plugin:0.10.6-SNAPSHOT:start (start) on project jaxRS-maven: No container start order could be found: Cannot resolve image dependencies for start order
[ERROR] Unresolved images:
[ERROR] taylodl/wls-mydomain depends on maven

If I run taylodl/wls-mydomain using the docker run option "--volumes-from maven" then everything runs as I expect and the volumes are mounted where I expect. I was expecting to accomplish the same thing.

@rhuss
Copy link
Collaborator

rhuss commented Dec 29, 2014

With the from you reference a container created from an image, which should be configured in this configuration, too. The name then either is the full <name> or an <alias>.

This maven container which you are referencing, where does it come from ? (could you post your complete plugin configuration ?)

The next version will provide more flexibility when binding to volumes (e.g. also local ones).

@taylodl
Copy link
Author

taylodl commented Dec 29, 2014

Ok, that wasn't clear that the had to refer to an image created by this plugin. I'm trying to refer to an image already running in a container named 'maven'. I'm really looking for docker's --volume-from functionality.

@rhuss rhuss self-assigned this Feb 6, 2015
@rhuss rhuss added the question label Feb 6, 2015
@rhuss rhuss added this to the 0.11.1 milestone Feb 6, 2015
@jgangemi
Copy link
Collaborator

that functionality doesn't currently exist but i think that could be easily added. an additional element (maybe external) could be added to the existing volumes element that could be used to reference volumes created outside the container.

@rhuss rhuss removed this from the 0.11.1 milestone Mar 1, 2015
jgangemi added a commit that referenced this issue Jul 16, 2015
Externally running containers can be specified via their names in the <link> and <volume> section. They will be looked up after the plugin tried to resolve the dependencies internally. That way you can easily restart only the container you are working on right now and the dependencies will be picked up later.

- pulled fine grained query methods out of DockerAccess into QueryService
- added coarse grained list/inspect methods to DockerAccess
- introduced model objects as proxies to JSON responses
- refactored RunService to accept DocerAccess instance via 'initialize' method
- allow linking/mounting from external containers
- account for external data volume containers
- extracted state information into it's own class
- Use 'ServiceHub' as central access point for services

Signed-off-by: Jae Gangemi <[email protected]>
@jgangemi jgangemi added this to the 0.13.2 milestone Jul 18, 2015
@jgangemi
Copy link
Collaborator

fixed in 0.13.2

leusonmario pushed a commit to leusonmario/docker-maven-plugin that referenced this issue Aug 18, 2018
Fix NPE for newly initialized git repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants