1. 程式人生 > >docker容器中配置掛載目錄的許可權

docker容器中配置掛載目錄的許可權

即定製ENTRYPOINT自動修改Docker中volume的許可權

build成功後執行報錯:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"docker-entrypoint.sh\": executable file not found in $PATH": unknown.
ERRO[0000] error waiting for container: context canceled

報錯資訊為 docker-entrypoint.sh 執行檔案找不到,經過搜尋發現是在build映象時docker-entrypoint.sh沒有執行許可權。

chmod +x docker-entrypoint.sh

重新build後啟動