rdar-lab / jfrog-cli-yocto-plugin

Apache License 2.0
6 stars 4 forks source link

Docker - Building with volume mapping to the workspace fails on errors #1

Open rdar-lab opened 3 years ago

rdar-lab commented 3 years ago

When using a local volume to map to the workdir, the bake command fails on errors on creating hard-links:

Exception: subprocess.CalledProcessError: Command 'cp -afl --preserve=xattr ./* /home/build/workspace/build/tmp/sysroots/qemux86' returned non-zero exit status 1

Subprocess output: cp: cannot create hard link '/home/build/workspace/build/tmp/sysroots/qemux86/lib/libudev.so.1' to './lib/libudev.so.1': Input/output error cp: cannot create hard link '/home/build/workspace/build/tmp/sysroots/qemux86/usr/lib/libudev.so' to './usr/lib/libudev.so': Input/output error

rdar-lab commented 3 years ago

As a workaround:

  1. Do not map the volume with the source code to the container, instead: a. Create a persistent docker container with a specific name b. Copy the source files to the /home/build/workspace directory (using the docker cp command for example) c. Start the build process d. If needed copy back the artifacts of the build (Again using docker cp command) e. Remove the container
rdar-lab commented 3 years ago

This does not happen when using local volume mapping to the 'tmp' directory. The README.md file was updated with the necessary steps.