question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docker-compose 2.1 depends_on conditions not supported

See original GitHub issue

Description

docker-compose.yml

version: '2.1'
services:
  redis1:
    image: redis
    depends_on:
      redis2:
        condition: service_started

  redis2:
    image: redis

Output:

/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/jglassman/iiworkspace/sandbox "-Dmaven.home=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=58768:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.2.5 io.fabric8:docker-maven-plugin:0.22.1:build
objc[32441]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java (0x105d3a4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x107dc04e0). One of the two will be used. Which one is undefined.
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.me.sandbox:sandbox:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 12, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building sandbox 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- docker-maven-plugin:0.22.1:build (default-cli) @ sandbox ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.292 s
[INFO] Finished at: 2017-11-02T14:31:01-04:00
[INFO] Final Memory: 14M/308M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.22.1:build (default-cli) on project sandbox: A type incompatibility occurred while executing io.fabric8:docker-maven-plugin:0.22.1:build: Cannot cast java.util.LinkedHashMap to java.util.List
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>io.fabric8:docker-maven-plugin:0.22.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/jglassman/.m2/repository/io/fabric8/docker-maven-plugin/0.22.1/docker-maven-plugin-0.22.1.jar
[ERROR] urls[1] = file:/Users/jglassman/.m2/repository/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.jar
[ERROR] urls[2] = file:/Users/jglassman/.m2/repository/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.jar
[ERROR] urls[3] = file:/Users/jglassman/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
[ERROR] urls[4] = file:/Users/jglassman/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar
[ERROR] urls[5] = file:/Users/jglassman/.m2/repository/com/github/jnr/jnr-unixsocket/0.12/jnr-unixsocket-0.12.jar
[ERROR] urls[6] = file:/Users/jglassman/.m2/repository/com/github/jnr/jnr-ffi/2.0.9/jnr-ffi-2.0.9.jar
[ERROR] urls[7] = file:/Users/jglassman/.m2/repository/com/github/jnr/jffi/1.2.11/jffi-1.2.11.jar
[ERROR] urls[8] = file:/Users/jglassman/.m2/repository/com/github/jnr/jffi/1.2.11/jffi-1.2.11-native.jar
[ERROR] urls[9] = file:/Users/jglassman/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar
[ERROR] urls[10] = file:/Users/jglassman/.m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar
[ERROR] urls[11] = file:/Users/jglassman/.m2/repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar
[ERROR] urls[12] = file:/Users/jglassman/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar
[ERROR] urls[13] = file:/Users/jglassman/.m2/repository/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar
[ERROR] urls[14] = file:/Users/jglassman/.m2/repository/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar
[ERROR] urls[15] = file:/Users/jglassman/.m2/repository/com/github/jnr/jnr-constants/0.9.1/jnr-constants-0.9.1.jar
[ERROR] urls[16] = file:/Users/jglassman/.m2/repository/com/github/jnr/jnr-enxio/0.12/jnr-enxio-0.12.jar
[ERROR] urls[17] = file:/Users/jglassman/.m2/repository/com/github/jnr/jnr-posix/3.0.29/jnr-posix-3.0.29.jar
[ERROR] urls[18] = file:/Users/jglassman/.m2/repository/org/apache/commons/commons-lang3/3.6/commons-lang3-3.6.jar
[ERROR] urls[19] = file:/Users/jglassman/.m2/repository/org/apache/commons/commons-text/1.1/commons-text-1.1.jar
[ERROR] urls[20] = file:/Users/jglassman/.m2/repository/org/json/json/20140107/json-20140107.jar
[ERROR] urls[21] = file:/Users/jglassman/.m2/repository/org/fusesource/jansi/jansi/1.16/jansi-1.16.jar
[ERROR] urls[22] = file:/Users/jglassman/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.57/bcpkix-jdk15on-1.57.jar
[ERROR] urls[23] = file:/Users/jglassman/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.57/bcprov-jdk15on-1.57.jar
[ERROR] urls[24] = file:/Users/jglassman/.m2/repository/org/apache/maven/plugins/maven-assembly-plugin/2.6/maven-assembly-plugin-2.6.jar
[ERROR] urls[25] = file:/Users/jglassman/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
[ERROR] urls[26] = file:/Users/jglassman/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
[ERROR] urls[27] = file:/Users/jglassman/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar
[ERROR] urls[28] = file:/Users/jglassman/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.1/doxia-sink-api-1.1.jar
[ERROR] urls[29] = file:/Users/jglassman/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar
[ERROR] urls[30] = file:/Users/jglassman/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[31] = file:/Users/jglassman/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar
[ERROR] urls[32] = file:/Users/jglassman/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[33] = file:/Users/jglassman/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[34] = file:/Users/jglassman/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[35] = file:/Users/jglassman/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[36] = file:/Users/jglassman/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar
[ERROR] urls[37] = file:/Users/jglassman/.m2/repository/org/codehaus/plexus/plexus-archiver/3.0.1/plexus-archiver-3.0.1.jar
[ERROR] urls[38] = file:/Users/jglassman/.m2/repository/org/iq80/snappy/snappy/0.3/snappy-0.3.jar
[ERROR] urls[39] = file:/Users/jglassman/.m2/repository/org/apache/maven/shared/file-management/1.1/file-management-1.1.jar
[ERROR] urls[40] = file:/Users/jglassman/.m2/repository/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.jar
[ERROR] urls[41] = file:/Users/jglassman/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
[ERROR] urls[42] = file:/Users/jglassman/.m2/repository/org/apache/maven/shared/maven-filtering/1.3/maven-filtering-1.3.jar
[ERROR] urls[43] = file:/Users/jglassman/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.6/maven-shared-utils-0.6.jar
[ERROR] urls[44] = file:/Users/jglassman/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.4/plexus-build-api-0.0.4.jar
[ERROR] urls[45] = file:/Users/jglassman/.m2/repository/org/codehaus/plexus/plexus-io/2.6/plexus-io-2.6.jar
[ERROR] urls[46] = file:/Users/jglassman/.m2/repository/org/apache/maven/maven-archiver/2.5/maven-archiver-2.5.jar
[ERROR] urls[47] = file:/Users/jglassman/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.21/plexus-utils-3.0.21.jar
[ERROR] urls[48] = file:/Users/jglassman/.m2/repository/org/apache/maven/shared/maven-repository-builder/1.0/maven-repository-builder-1.0.jar
[ERROR] urls[49] = file:/Users/jglassman/.m2/repository/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar
[ERROR] urls[50] = file:/Users/jglassman/.m2/repository/org/yaml/snakeyaml/1.18/snakeyaml-1.18.jar
[ERROR] urls[51] = file:/Users/jglassman/.m2/repository/com/google/guava/guava/23.0-android/guava-23.0-android.jar
[ERROR] urls[52] = file:/Users/jglassman/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
[ERROR] urls[53] = file:/Users/jglassman/.m2/repository/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar
[ERROR] urls[54] = file:/Users/jglassman/.m2/repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar
[ERROR] urls[55] = file:/Users/jglassman/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar
[ERROR] urls[56] = file:/Users/jglassman/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.24/plexus-interpolation-1.24.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Process finished with exit code 1

Info

  • d-m-p version :
  • Maven version (mvn -v) :
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"
  • Docker version :
ip-192-168-1-7:sse-service jglassman$ docker --version && docker-compose --version
Docker version 17.09.0-ce, build afdb6d4
docker-compose version 1.16.1, build 6d1ac21

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

1reaction
jimusbobuscommented, Jul 26, 2022

Sorry no I do not, I moved on from that job and cleaned up all my old repositories and had forgotten about this issue and have deleted the repo 😕

0reactions
robson90commented, Jul 26, 2022

@jimusbobus the link you provided returns a 404. Do you have it still on hand ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the alternative to condition form of depends_on in ...
The current docker-compose documentation states: Version 3 no longer supports the condition form of depends_on.
Read more >
Compose file version 3 reference - Docker Documentation
This table shows which Compose file versions support specific Docker releases. Compose file format, Docker Engine release. Compose specification, 19.03.0+. 3.8 ...
Read more >
Support docker compose depends_on condition-clause ...
Support docker compose depends_on condition-clause (version 2.1 of docker compose configuration file) ; Relates to 1 ; Is required for 1 ; Is...
Read more >
Depends_on condition service_completed_successfully #8154
Description of the Issue. I wrote a compose file docker-compose.yml with two services and the option depends_on in one of the services:.
Read more >
Running Airflow in Docker
Older versions of docker-compose do not support all the features required by the Airflow docker-compose.yaml file, so double check that your version meets...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found