Quantcast
Viewing latest article 20
Browse Latest Browse All 23

Answer by Cyberwiz for How to include files outside of Docker's build context?

The best way to work around this is to specify the Dockerfile independently of the build context, using -f.

For instance, this command will give the ADD command access to anything in your current directory.

docker build -f docker-files/Dockerfile .

Update: Docker now allows having the Dockerfile outside the build context (fixed in 18.03.0-ce). So you can also do something like

docker build -f ../Dockerfile .

Viewing latest article 20
Browse Latest Browse All 23

Trending Articles



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