title: Bitbucket docker image cache for two parallel docker builds
body: <p>I was tinkering with bitbucket pipelines for some time and have come far in improving time and resources taken for a buid/deployment script.
  But i got stuck at this Problem:</p>
  <pre><code>  - parallel:
      - step:
          caches:
            - docker
          services:
            - docker
          script:
            - echo ${REGISTRY_PASSWORD} | docker login registry.our-domain.net --username bitbucket --password-stdin &amp;&amp;
            - docker build --rm -t registry.our-domain.net/project-container_2:staging -f docker/web/Dockerfile . &amp;&amp;
            - docker push registry.our-domain.net/project-container_2:staging
      - step:
          caches:
            - docker
          services:
            - docker
          script:
            - echo ${REGISTRY_PASSWORD} | docker login registry.our-domain.net --username bitbucket --password-stdin &amp;&amp;
            - docker build --rm -t registry.our-domain.net/project-container_1:staging -f docker/app/Dockerfile . &amp;&amp;
            - docker push registry.our-domain.net/project-container_1:staging
  </code></pre>
  <p>If i try to cache both image build processes, i cant. Only the build process that is compiled first will be cached.</p>
  <blockquote>
  <p>Skipping assembly of docker cache as one is already present
  Cache &quot;docker&quot;: Skipping upload for existing cache</p>
  </blockquote>
  <p>It seems like the caching is done based on the name of the defined cache. the docker-cache is done by bitbucket, so i cant &quot;rename&quot; the second one.</p>
  <p>Does somebody have the same issue/ a solution ?</p>