events.action: opened
events.author: zhukovheorhii
events.masked_author: username_0
events.text: OS: macOS 10.15.6
  Docker version 19.03.12, build 48a66213fe
  
  gradle dependency:
   testImplementation("org.testcontainers:testcontainers:1.14.3")
  
  I am trying to create GenericContainer
  
  `class IgniteContainer(containerName: String) : GenericContainer<IgniteContainer>(containerName) {
  
      constructor() : this("apacheignite/ignite:2.8.1") {
          val filePath = "https://raw.githubusercontent.com/apache/ignite/master/examples/config/example-cache.xml"
          this.withCommand( "-e", "CONFIG_URI=$filePath")
          this.start()
      }
  }` 
  
  As result I have an error 
  
  `Container startup failed
  org.testcontainers.containers.ContainerLaunchException: Container startup failed
  	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:330)
  	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:311)
  	at com.flo.rater.config.IgniteContainer.<init>(IgniteContainer.kt:20)
  	at com.flo.rater.test.BaseTest$Companion.setUpBeforeAllTest(BaseTest.kt:83)
  	at com.flo.rater.test.BaseTest.setUpBeforeAllTest(BaseTest.kt)
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.lang.reflect.Method.invoke(Method.java:498)
  	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
  	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
  	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125)
  	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132)
  	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:111)
  	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:60)
  	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
  	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
  	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104)
  	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62)
  	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43)
  	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35)
  	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
  	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
  	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$8(ClassBasedTestDescriptor.java:371)
  	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
  	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:369)
  	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:193)
  	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:77)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:132)
  	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
  	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
  	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
  	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
  	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:115)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
  	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
  	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
  	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
  	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
  	at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
  	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
  	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
  	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
  	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
  Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
  	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
  	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:323)
  	... 51 more
  Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
  	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:498)
  	at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:325)
  	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
  	... 52 more
  Caused by: com.github.dockerjava.api.exception.BadRequestException: {"message":"OCI runtime create failed: container_linux.go:349: starting container process caused \"exec: \\\"-e\\\": executable file not found in $PATH\": unknown"}
  
  	at com.github.dockerjava.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:283)
  	at com.github.dockerjava.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:271)
  	at com.github.dockerjava.okhttp.OkHttpInvocationBuilder.post(OkHttpInvocationBuilder.java:116)
  	at com.github.dockerjava.core.exec.StartContainerCmdExec.execute(StartContainerCmdExec.java:31)
  	at com.github.dockerjava.core.exec.StartContainerCmdExec.execute(StartContainerCmdExec.java:13)
  	at com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
  	at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
  	at com.github.dockerjava.core.command.StartContainerCmdImpl.exec(StartContainerCmdImpl.java:43)
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.lang.reflect.Method.invoke(Method.java:498)
  	at org.testcontainers.dockerclient.AuditLoggingDockerClient.lambda$wrappedCommand$14(AuditLoggingDockerClient.java:102)
  	at com.sun.proxy.$Proxy57.exec(Unknown Source)
  	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:419)
  	... 54 more`
events.title: OCI runtime create failed
events.type: issue
events.action: created
events.author: vcvitaly
events.masked_author: username_1
events.text: That doesn't seem to be related to Testcontainers. The cause ex was thrown at:
  `at com.github.dockerjava.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:283)`
  
  Testcontainers uses docker-java under that hood, and it uses docker daemon as I understand. Is docker set up properly and docker binary file available on your PATH?
events.type: comment
events.action: created
events.author: zhukovheorhii
events.masked_author: username_0
events.text: When I'm running same image via terminal all is fine. When using testcontainers - it fails.
events.type: comment
events.action: created
events.author: bsideup
events.masked_author: username_2
events.text: I am pretty sure the following will fail as well:
  ```shell
  docker run -it --rm apacheignite/ignite:2.8.1 -e CONFIG_URI=https://raw.githubusercontent.com/apache/ignite/master/examples/config/example-cache.xml
  ```
  
  Also, if you need to set an environment variable, you do it by customizing the container (e.g. `withEnv`). `-e` is Docker's flag that sets the environment variable.
events.type: comment
events.action: closed
events.author: bsideup
events.masked_author: username_2
events.type: issue