Pushing multiple Docker images in parallel in Rancher pipeline Pushing multiple Docker images in parallel in Rancher pipeline kubernetes kubernetes

Pushing multiple Docker images in parallel in Rancher pipeline


Docker's /var/lib/docker can only be managed by a single daemon. If you want to publish more than one there is a workaround for that. Try something like this:

stages:- name: Publish images_1  steps:    - publishImageConfig:        dockerfilePath: ./frontend/deployment/Dockerfile        buildContext: ./frontend        tag: registry.remote.com/remote/frontend-${CICD_EXECUTION_ID}        pushRemote: true        registry: registry.remote.com- name: Publish images_2  steps:    - publishImageConfig:        dockerfilePath: ./gateway/backend/src/Dockerfile        buildContext: ./gateway/backend        tag: registry.remote.com/remote/backend-${CICD_EXECUTION_ID}        pushRemote: true        registry: registry.remote.com      env:        PLUGIN_STORAGE_PATH: /var/lib/docker_2    [...]

This bug was already reported in this thread, you can find more info there.Issue was supposed to be fixed in Rancher v2.2 but some people still experience this in v2.3.However, the workaround is still valid.

I am posting this answer as a community wiki because the fix was not my original idea.

Please let me know if that helped.