-
Bug
-
Resolution: Unresolved
-
Minor
-
None
I'm using Multi-configuration variables in the Dockerfile parameter box (Dockerfile.$ubuntu_release.$jdk in this example). They are used correctly in the error output but not in the actual docker build command, so the build fails:
{{Build Docker image from ./Dockerfile ...
$ docker build --tag 6e06fb3a96de83181451f73a093d1313f340d7f5 --file Dockerfile.$ubuntu_release.$jdk /home/core/jenkins/workspace/project/jdk/oraclejdk7/label/docker/ubuntu_release/lucid
The Dockerfile (Dockerfile.lucid.oraclejdk7) must be within the build context (/home/core/jenkins/workspace/project/jdk/oraclejdk7/label/docker/ubuntu_release/lucid)
FATAL: Failed to build docker image from project Dockerfile
java.lang.RuntimeException: Failed to build docker image from project Dockerfile
at com.cloudbees.jenkins.plugins.docker_build_env.Docker.buildImage(Docker.java:121)
at com.cloudbees.jenkins.plugins.docker_build_env.DockerfileImageSelector.prepareDockerImage(DockerfileImageSelector.java:41)
at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:152)
at hudson.model.Build$BuildExecution.doRun(Build.java:156)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
at hudson.model.Run.execute(Run.java:1741)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Notifying upstream projects of job completion
Finished: FAILURE}}
Same form me here.
I like to build my repository in two different ubuntu environments, thus i have two Dockerfiles in my repo.
Additionally there is the problem that the docker tag (e.g. 6e06fb3a96de83181451f73a093d1313f340d7f5)
only depends on the git commit, with might beis identical for both Dockerfiles (it seems that the file "Dockerfile" is hashed each time). It is not possible for the plugin two distinguish the docker containers.Currently it is not possible to setup a multi-config environment with this plugin