why doesn't chown work in Dockerfile?

后端 未结 5 674
日久生厌
日久生厌 2020-12-02 10:44

My Dockerfile creates a directory, chown\'s it, and then lists the directory afterwards. The directory is still owned by root. Why is that?

Here is the Dockerfile:

5条回答
  •  温柔的废话
    2020-12-02 11:30

    In my experience, chown does not work when mounting to root (VOLUME /test). Use a non-root location (VOLUME /var/test).

提交回复
热议问题