title: How to use docker image from build step in deploy step in CircleCI 2.0?
body: <p>Struggling for a few last days to migrate from CircleCI 1.0 to 2.0 and while the build process is done, deployment is still a big issue. CircleCI documentation is not really of a big help.</p>
  
  <p>Here is a similar <code>config.yml</code> to what I have:</p>
  
  <pre><code>version 2
  
  jobs:
    build:
      docker:
        - image: circleci/node:8.9.1
  
      steps:
        - checkout
        - setup_remote_docker
  
        - run
            name: Install required stuff
            command: [...]
  
        - run:
            name: Build
            command: docker build -t project .
  
    deploy:
      docker:
        - image: circleci/node:8.9.1
      steps:
        - checkout
        - run:
            name: Deploy
            command: |
              bash scripts/deploy/deploy.sh
              docker tag project [...]
              docker push [...]
  
  workflows:
    version: 2
    build-deploy:
      jobs:
        - build
        - deploy:
            requires:
              - build
            filters:
              branches:
                only: develop
  </code></pre>
  
  <p>The issue is in <code>deploy</code> job. I have to specify the <code>docker: -image</code> point but I want to reuse the environment from <code>build</code> job where all the required stuff is installed already. Surely, I could just install them in <code>deploy</code> job, but having multiple <code>deploy</code> jobs leads to code duplication which is something I do not want.</p>