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 relative paths in docker-compose 'volumes:' statements #846

Closed
emetsger opened this issue Aug 23, 2017 · 2 comments
Closed

Support relative paths in docker-compose 'volumes:' statements #846

emetsger opened this issue Aug 23, 2017 · 2 comments

Comments

@emetsger
Copy link
Contributor

Description

Relative paths in docker-compose volumes: statements are not supported. For example, the volumes stanza below

version: '2.2'
services:
  solr:
  ...
     volumes:
     - "./cores:/opt/solr/server/solr/mycores"

results in the following error on docker:start:

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.21-SNAPSHOT:start (default-cli) on project rmap-indexing-solr: I/O Error: Unable to create container for [solr:6.6.0-alpine] : create ./cores: "./cores" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed (Internal Server Error: 500) -> [Help 1]

Info

  • d-m-p version : e50a7a5, 0.21-SNAPSHOT
  • Maven version (mvn -v) :
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T10:41:47-06:00)
Maven home: /Users/esm/maven-3
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac"
  • Docker version : Docker version 1.11.2, build b9f10c9, docker-machine version 0.7.0, build a650a40
emetsger added a commit to emetsger/docker-maven-plugin that referenced this issue Aug 23, 2017
* Moves path resolution logic to a utility class
* Includes tests
* Adds mockito-core as a test dependency

Addresses fabric8io#846
emetsger added a commit to emetsger/docker-maven-plugin that referenced this issue Aug 23, 2017
* Moves path resolution logic to a utility class
* Includes tests
* Adds mockito-core as a test dependency

Addresses fabric8io#846

Signed-off-by: Elliot Metsger <emetsger@jhu.edu>
emetsger added a commit to emetsger/docker-maven-plugin that referenced this issue Aug 23, 2017
* Moves path resolution logic to a utility class
* Includes tests
* Adds mockito-core as a test dependency

Addresses fabric8io#846

Signed-off-by: Elliot Metsger <emetsger@jhu.edu>
@emetsger
Copy link
Contributor Author

FYI, after upgrading the docker instance to v17.06.1-ce, the error message is a little more clear, with the additional text: If you intended to pass a host directory, use absolute path

DOCKER> I/O Error [Unable to create container for [solr:6.6.0-alpine] : create ./cores: "./cores" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path (Internal Server Error: 500)]

emetsger added a commit to emetsger/docker-maven-plugin that referenced this issue Aug 24, 2017
emetsger added a commit to emetsger/docker-maven-plugin that referenced this issue Aug 24, 2017
* Moves path resolution logic to a utility class
* Includes tests
* Adds mockito-core as a test dependency

Addresses fabric8io#846

Signed-off-by: Elliot Metsger <emetsger@jhu.edu>
emetsger added a commit to emetsger/docker-maven-plugin that referenced this issue Aug 24, 2017
emetsger added a commit to emetsger/docker-maven-plugin that referenced this issue Aug 24, 2017
…asedir (fabric8io#846).

Signed-off-by: Elliot Metsger <emetsger@jhu.edu>
emetsger added a commit to emetsger/rmap that referenced this issue Aug 25, 2017
* requires the Docker Maven Plugin be compiled and installed (mvn install) from https://github.com/emetsger/docker-maven-plugin/tree/volumes-846 (see also: fabric8io/docker-maven-plugin#846)
* configures an "http-solr" bean profile, with a corresponding http-solr.properties file
* starts up solr in pre-integration-test, stops it in post-integration-test
* configures the failsafe plugin to run integration tests
* adds a SimpleSolrIT
* ignores the SimpleSolrTest (any methods that are still needed should be moved to SimpleSolrIT, because they require a running Solr instance as they are currently written)
emetsger added a commit to emetsger/rmap that referenced this issue Aug 28, 2017
* requires the Docker Maven Plugin be compiled and installed (mvn install) from https://github.com/emetsger/docker-maven-plugin/tree/volumes-846 (see also: fabric8io/docker-maven-plugin#846)
* configures an "http-solr" bean profile, with a corresponding http-solr.properties file
* starts up solr in pre-integration-test, stops it in post-integration-test
* configures the failsafe plugin to run integration tests
* adds a SimpleSolrIT
* ignores the SimpleSolrTest (any methods that are still needed should be moved to SimpleSolrIT, because they require a running Solr instance as they are currently written)
emetsger added a commit to emetsger/docker-maven-plugin that referenced this issue Aug 30, 2017
* Moves path resolution logic to a utility class
* Includes tests
* Adds mockito-core as a test dependency

Addresses fabric8io#846

Signed-off-by: Elliot Metsger <emetsger@jhu.edu>
emetsger added a commit to emetsger/docker-maven-plugin that referenced this issue Aug 30, 2017
…asedir (fabric8io#846).

Signed-off-by: Elliot Metsger <emetsger@jhu.edu>
@emetsger
Copy link
Contributor Author

Closed by merge 802fa9b of pr #848

emetsger added a commit to emetsger/rmap that referenced this issue Sep 12, 2017
* requires the Docker Maven Plugin be compiled and installed (mvn install) from https://github.com/emetsger/docker-maven-plugin/tree/volumes-846 (see also: fabric8io/docker-maven-plugin#846)
* configures an "http-solr" bean profile, with a corresponding http-solr.properties file
* starts up solr in pre-integration-test, stops it in post-integration-test
* configures the failsafe plugin to run integration tests
* adds a SimpleSolrIT
* ignores the SimpleSolrTest (any methods that are still needed should be moved to SimpleSolrIT, because they require a running Solr instance as they are currently written)
emetsger added a commit to emetsger/rmap that referenced this issue Oct 3, 2017
* requires the Docker Maven Plugin be compiled and installed (mvn install) from https://github.com/emetsger/docker-maven-plugin/tree/volumes-846 (see also: fabric8io/docker-maven-plugin#846)
* configures an "http-solr" bean profile, with a corresponding http-solr.properties file
* starts up solr in pre-integration-test, stops it in post-integration-test
* configures the failsafe plugin to run integration tests
* adds a SimpleSolrIT
* ignores the SimpleSolrTest (any methods that are still needed should be moved to SimpleSolrIT, because they require a running Solr instance as they are currently written)
emetsger added a commit to emetsger/rmap that referenced this issue Oct 19, 2017
* requires the Docker Maven Plugin be compiled and installed (mvn install) from https://github.com/emetsger/docker-maven-plugin/tree/volumes-846 (see also: fabric8io/docker-maven-plugin#846)
* configures an "http-solr" bean profile, with a corresponding http-solr.properties file
* starts up solr in pre-integration-test, stops it in post-integration-test
* configures the failsafe plugin to run integration tests
* adds a SimpleSolrIT
* ignores the SimpleSolrTest (any methods that are still needed should be moved to SimpleSolrIT, because they require a running Solr instance as they are currently written)
emetsger added a commit to emetsger/rmap that referenced this issue Oct 19, 2017
* requires the Docker Maven Plugin be compiled and installed (mvn install) from https://github.com/emetsger/docker-maven-plugin/tree/volumes-846 (see also: fabric8io/docker-maven-plugin#846)
* configures an "http-solr" bean profile, with a corresponding http-solr.properties file
* starts up solr in pre-integration-test, stops it in post-integration-test
* configures the failsafe plugin to run integration tests
* adds a SimpleSolrIT
* ignores the SimpleSolrTest (any methods that are still needed should be moved to SimpleSolrIT, because they require a running Solr instance as they are currently written)
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

1 participant