0

I am using podman and trying to map an absolute path on my mac to /opt/flatbuffers on the container.

ADD /Users/bryan/src/git/flatbuffers /opt/flatbuffers

Getting this build error:

STEP 8/9: ADD /Users/bryan/src/git/flatbuffers /opt/flatbuffers
Error: error building at STEP "ADD /Users/bryan/src/git/flatbuffers /opt/flatbuffers": checking on sources under "/var/tmp/libpod_builder2832945314/build": copier: stat: "/Users/bryan/src/git/flatbuffers": no such file or directory

I have verified the absolute path exists and is populated.

BMitch
  • 231,797
  • 42
  • 475
  • 450
BAR
  • 15,909
  • 27
  • 97
  • 185
  • 1
    You can't `COPY` or `ADD` arbitrary files into your image, they must be within the build-context directory. See [Docker COPY from ubuntu absolute path](https://stackoverflow.com/questions/47012495/docker-copy-from-ubuntu-absolute-path), or [How to include files outside of Docker's build context?](https://stackoverflow.com/questions/27068596/how-to-include-files-outside-of-dockers-build-context) for some ways to work around it. (I assume Podman has the same restriction.) – David Maze Sep 09 '22 at 01:44
  • Thanks! So it seems a symlink is the only way. – BAR Sep 09 '22 at 01:54
  • Actually i need to link a directory and symlinks dont work either. – BAR Sep 09 '22 at 04:16

0 Answers0