0

When I start the Docker container which has systemd in it, with SELinux in enforcing state, I get an error message "No such file or directory" and the container does not start.

Audit logs give the below error messages:

avc: denied { read execute } for pid=XXXX comm="w" path="/w/w" dev="sda3" ino=135817694 scontext=system_u:system_r:container_t:s0:c712,c950 tcontext=system_u:object_r:container_file_t:s0:c373,c565 tclass=file permissive=0

avc: denied { read execute } for pid=XXXX comm="sh" path="/usr/bin/bash" dev="sda3" ino=2687570 scontext=system_u:system_r:container_t:s0:c337,c629 tcontext=system_u:object_r:default_t:s0 tclass=file permissive=0

I added below SELInux policies to fix it:

allow container_t default_t:file { create execute execute_no_trans ioctl open read write };
allow container_t container_file_t:file { execute execute_no_trans read write };
allow container_t default_t:dir { add_name remove_name write };

But I still the same error.

1 Answer 1

0

Docker have own startup method. Launch with option '--restart=always'

docker reference

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .