Docker build context - can't find folder

this is my first complex build where I’m installing local packages when building the image . I don’t want to ADD the source install files (they are 6GB in size) if I don’t have to. They are just there long enough to run the install. my build directory contains a folder “myInstall” which contains all the software and it appears to be added to the context properly - when I run docker build, it looks like it’s sending the context correctly because it shows
"Sending build context to Docker daemon 6.385GB"

In my docker file I have the command
RUN /myInstall/linux_x86_64/installc
which returns
/bin/sh: 1: /myInstall/linux_x86_64/installc: not found

If I understand docker build context… I should be able to reference that command without an issue. do I really need to ADD the entire 6GB, run the install, then remove it? Or am I doing something wrong in referencing the path for the build context?

if you ADD or COPY the source to your image, you will not be able to delete it. so it is not recommended. Also your image size will suffer, cause it will everytime > 6 GB. (except you later combine the layers)

When I compile I do the following things within one RUN statement.

  • install compiler, git/svn/cvs/hg/, everything which is needed to build your app
  • git clone your app into the image
  • make all to build your app
  • install your binaries to a prominent place. /bin for example
  • remove the code
  • remove your compilers and everything else what just was used for building, but is not required for running your app