Quantcast
Channel: How to include files outside of Docker's build context? - Stack Overflow
Viewing all articles
Browse latest Browse all 23

Answer by Trevor Boyd Smith for How to include files outside of Docker's build context?

$
0
0

Create a wrapper docker build shell script that grabs the file then calls docker build then removes the file.

a simple solution not mentioned anywhere here from my quick skim:

  • have a wrapper script called docker_build.sh
  • have it create tarballs, copy large files to the current working directory
  • call docker build
  • clean up the tarballs, large files, etc

this solution is good because (1.) it doesn't have the security hole from copying in your SSH private key (2.) another solution uses sudo bind so that has another security hole there because it requires root permission to do bind.


Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>