Build failed: cannot build: cannot be mapped to a host ID

Any ideas here. We are working through making a jupyter/scipy-notebook image work and have suddenly hit this error

build failed: cannot build base image: Error processing tar file(exit status 1): Container ID 165636 cannot be mapped to a host ID

Error: build failed: cannot build base image: Error processing tar file(exit status 1): Container ID 165636 cannot be mapped to a host ID
```

The error message tells me nothing. Could you provide a minimal, reproducible example?

Same here when copying files from one image to another. Works fine when building the same Dockerfile on local.

.gitpod.yml

image:
  file: .gitpod.Dockerfile

.gitpod.Dockerfile

FROM ea31337/ea-tester:dev as ea-tester
FROM gitpod/workspace-full as gitpod
COPY --from=ea-tester --chown=gitpod:sudo /opt /opt

Errors:

Step 3/10 : COPY --from=ea-tester --chown=gitpod:sudo /opt /opt
Step 3/10 : COPY --from=ea-tester --chown=gitpod:sudo /opt /opt

build failed: cannot build base image: failed to copy files: failed to copy directory: Error processing tar file(exit status 1): Container ID 166537 cannot be mapped to a host IDStep 3/10 : COPY --from=ea-tester --chown=gitpod:sudo /opt /opt

Error: build failed: cannot build base image: failed to copy files: failed to copy directory: Error processing tar file(exit status 1): Container ID 166537 cannot be mapped to a host ID

You can try at: https://gitpod.io/#https://github.com/EA31337/Strategy-RSI/-/commit/6a95b85ed0dc09179cac8714fdcb727e123418e8

The post below has a link to the script layer.sh which will be executed on top of your image. You could test your image by adding the layers defined in the Docker file next to the layer.sh.

PRs to improve this are very welcome. :wink: