skip to Main Content

I am new to docker and trying to create docker file from SLES 15 base image:

FROM <base image - SLES 15 >

LABEL <label> 
    Version="1.0"

In docker-compose.yml , I have mentioned :

working_dir: $PWD
volumes:
      - $PWD/../../:$PWD/../../

When I start docker container, I am not able to access any file or directory with following error:

 ls: cannot access '<directory/file name>': Operation not permitted 
total 0
d????????? ? ? ? ?            ? <directory-name>

I tries possible solutions suggested like :

  1. Setting file permissions with chown/chmod
  2. Disable selinux

Any idea about root cause of this issue and possible solution?

Similar issue from stackoverflow : No access rights in Docker Container when using SLES15 and *Suse Container

2

Answers


  1. Chosen as BEST ANSWER

    I was getting permission issues because I was running SLES based docker container inside CentOS based host machine. If I use SLES based host machine, I could run the container without any permission issue.


  2. in my case I fixed it by upgrading docker to latest version.

    reference link.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search