How to access local file when building from Dockerfile?
Otherwise if an internet connection is not a limiting factor while you're working just:
- Upload the file a cloud as Dropbox
- Go to your docker shell and
wget https://www.cloudnameXYZ.com/filename
Why don't you COPY the file inside the container before executing RUN
?
FROM centos:6
COPY hello.rpm /tmp/hello.rpm
RUN rpm -ivh /tmp/hello.rpm
This assumes that hello.rpm
is next to your Dockerfile
when you build it.