I had a Docker container with a folder mounted in it from the host (noureldin.local.crt is a folder):
etc/ssl/CA/ICA01/keys/noureldin.local.crt:etc/ssl/samba.crt:ro
and then I deleted that folder from the host and created a file with exactly the same name instead of the folder in the same path (noureldin.local.crt now is a file), and then restarted the container, but now the container cannot be started because docker tells that this is not a folder, with this error:
d241b7e25143187fbf8258a664f5d409d1abd4d9578f045cb493df26ed204d46
docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:359: container init caused \\\"rootfs_linux.go:53: mounting \\\\\\\"/etc/ssl/CA/ICA01/keys/noureldin.local.crt\\\\\\\" to rootfs \\\\\\\"/var/lib/docker/overlay/8888974e268a54dafd22ccb2d05f9cd33da4bfa70d3ee1df0070fcc8c804c411/merged\\\\\\\" at \\\\\\\"/var/lib/docker/overlay/8888974e268a54dafd22ccb2d05f9cd33da4bfa70d3ee1df0070fcc8c804c411/merged/etc/ssl/samba.crt\\\\\\\" caused \\\\\\\"not a directory\\\\\\\"\\\"\"\n".
and here I tried to delete that path I see in the error from overlay folder, but always I get the same error with a new created paths. (I know I should have not deleted anything manually).
After that I tried again to restore folders with the same names instead of the files (just like the first step). but now the container doesn't start and exits with error 126.
I tried to delete and then recreate the container but I always get that error (it is something related with the path I am mounting from the host).
Could someone help me to solve that problem (I want to keep the paths the same).