title: How to build multiple docker containers from jenkinsfile?
body: <p>I have 3 different Docker images. I need to build these images from Jenkins file. I have Wildfly, Postgres, Virtuoso Docker images with individual Docker file. As of now, I am using the below command to build these images:</p>
  
  <p>The directory structure is, Docker is the root diretory.</p>
  
  <p>Docker->build->1. wildfly 2. postgres 3. virtuoso</p>
  
  <p>In my jenkins file I have below command to build the image:</p>
  
  <pre><code>stage('Building test images')
  {
     sh 'docker build -t virtuoso -f $WORKSPACE/build/virtuoso/Dockerfile .'
  }
  </code></pre>
  
  <p>But I am getting error as below:</p>
  
  <pre><code>Step 7/16 : COPY ./install $VIRT_HOME/install
  COPY failed: stat /var/lib/docker/tmp/docker-builder636357036/install: no such file or directory
  [Pipeline] }
  </code></pre>
  
  <p>For reference below is my dockerfile:</p>
  
  <pre><code>FROM virtuoso:latest
  
  ENV var1 /opt/virtuoso-opensource
  ENV VIRT_db /opt/virtuoso-opensource/var/lib/virtuoso/db
  ENV RUN_CONFIG=/opt/virtuoso-opensource/install/config
  
  RUN export PATH=$PATH:/opt/virtuoso-opensource/bin
  
  RUN mkdir $var1/install
  
  COPY ./install $var1/install
  
  WORKDIR $VIRT_db
  CMD ["/opt/virtuoso-opensource/bin/init.sh"]
  </code></pre>
  
  <p>And the workspace is /home/jenkins/Docker and my guess  is I am running docker build command from $workspace directory and this command should run from the virtuoso directory. </p>
  
  <p>My question is how build image from Jenkins file?</p>
  
  <p>Thanks in advance.</p>