I am running a docker container with a volume mounted (-v) which is a mounted directory on network (NAS). This mount point has write access provisioned to the user which runs docker process on the server.
However when I run the container as docker run -v path1:path2:z I get permission denied error on path1.
Error - docker: Error response from daemon: error while creating mount source path 'path1': mkdir 'path1': Permission Denied
Related
i am new to docker. i want to share a volume with multiple containers which are existing previously in my local pc not in the docker hub.
when i am using the command "sudo docker run -i -t --mount source=volume,target=/volume-shared ubuntu20", this is coming error as below.
Unable to find image 'ubuntu20:latest' locally
docker: Error response from daemon: pull access denied for ubuntu20, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
here ubuntu20 is the container name.
can anyone help.
Thanks in advance.
You need to create volume with mount point on folder you want, and then just mount volume to container.
Check this:
https://docs.docker.com/engine/reference/commandline/volume_create/
I run a QNAP TS-453a at home running Container Station on it. Suddenly multiple containers got some sort of error about "Permission Denied".
For example postgres\postgres returns:
error: exec failed: permission denied
nodered/node-red docker returns: exec ./entrypoint.sh: permission denied. And this continues in different forms for a total of 20 containers. Basically every container returns permission errors on the docker-entrypoint. I shared my docker.sock with 3 containers to maintain it: HomeAssistant, WatchTower and Portainer.
What I tried:
Recreate the container from scratch
Checked the permissions on the shared volumes
Reinstalled Container Station/Docker
Restart the QNAP NAS
sudo chmod 666 /var/run/docker.sock
We're running DBT in Airflow on a GCP Compute Engine using Docker and docker-compose. In the docker-compose.yml file for our Airflow deployment, the DBT repo is attached as a volume:
webserver:
...
volumes:
- ../our-dbt-repo:/usr/local/airflow/dbt
Running dbt-run usually generates a /logs directory with DBT logs. However, running dbt-run from the docker container on the GCP machine is throwing the error [Errno 13] Permission denied: 'logs'.
To test permissions, I ran docker exec -it <DockerContainerID> bash from the command line of the GCP machine (while the docker container is running) to get into the running docker container, and ran cd /usr/local/airflow/dbt/ && touch file.txt, and received the error: touch: cannot touch 'file.txt': Permission denied. So it seems clear that no files can be added to the /dbt folder that was added as a volume in the Docker Container, which is why the logs cannot get written.
Is there a way to give our /dbt volume permissions to write logs? Perhaps we can write DBT logs somewhere else (not in the container on the GCP server), that way there are no writes required in the /dbt volume on the container?
I pulled a nginx+php container (https://hub.docker.com/r/imagine10255/centos6-lnmp-php56/) and had started that, it will create a folder to specific location i.e.(D:\xampp\htdocs\centos6-lnmp-php56\home\website), but now i can't restart it, anyone know how to do restart it with out deleting the folder above ?
error message is here:
Error response from daemon: Cannot restart container centos6-lnmp-php56: error while creating mount source path '/c/Users/hkveg/Documents/Kitematic/centos6-lnmp-php56/home/website': mkdir /c/Users/hkveg/Documents/Kitematic/centos6-lnmp-php56: file exists
command tried:
$ docker restart centos6-lnmp-php56
Error response from daemon: Cannot restart container
centos6-lnmp-php56: error while creating mount source path
'/c/Users/hkveg/Documents/Kitematic/centos6-lnmp-php56/home/website':
mkdir /c/Users/hkveg/Documents/Kitematic/centos6-lnmp-php56: file
exists
As same as mysql container:
$ docker restart mysql
Error response from daemon: Cannot restart container mysql: error
while creating mount source path
'/c/Users/hkveg/Documents/Kitematic/mysql/var/lib/mysql': mkdir
/c/Users/hkveg/Documents/Kitematic/mysql: file exists
When issuing the docker log <container> command, I am getting the following error:
[root#Infra-1 ~]# docker logs gitlab-redis
chmod: changing permissions of '/var/lib/redis': Permission denied
gitlab-redis is a container that has exited.
In fact, the directory does not exist at all:
[root#Infra-1 ~]# ls /var/lib/redis
ls: cannot access /var/lib/redis: No such file or directory
I suppose that docker log is looking in the wrong location. Could it possibly have been misconfigured? Where should I check?
I think docker logs is working, the output of the logs is chmod: changing permissions of '/var/lib/redis': Permission denied.
/var/lib/redis is inside the container, not on the host.