Docker Error - No Permission To Read From
Вставка
- Опубліковано 15 вер 2024
- This tutorial is on how to resolve this error message when you are trying to build an image using the Docker.
error checking context: 'no permission to read from FILENAME'
Command used in this demo.
1) To build docker image
docker build -t IMAGE_NAME .
2) Clear screen
clear
3) Directory list
ls
4) Make new directory
mkdir
5) Copy file
cp
6) Revision of Ubuntu
lsb_release -a
#docker, #image,
Thanks, that got me out of a bind. I've done a little looking around and I can't find an explanation as to why this is necessary though. Is it a bug? Is it intended behaviour? If so, do you know why, and what the intended benefit is?
This is due to something to do with file and directory permission. If you do ls -al you will see in your directory that root user does not have execute capabilities. If you really need to run the dockerfile on the current directory, you will have to change the dockerfile permission using the following command.
chnod 777 ./dockerfile.
I hope that helps.
Thanks for the video, the problem is that we've used the home directory to build our stuff
you can go anywhere under your home directory to build your image, for example :
cd /home/user/Desktop
sudo docker build .
Good point!
Hi bro please give video for prosoft plx32-eip-mbtcp ... complete configuration setup video
I have logged that video in our to-do list. Thanks for your suggestion.
Thnx
You are welcome 🙏.
But, this is not a solution.
Sorry. A bit more detail about the gap, please.