How to change the owner of VOLUME directory in Dockerfile?
As stated in the documentation, VOLUME instruction inherits the directory content and permissions existing in the container, so you can workaround the problem with a dockerfile like this:

FROM ubuntu:xenial
RUN useradd -d /home/ubuntu -ms /bin/bash -g root -G sudo -p ubuntu ubuntu
RUN mkdir /opt/myvolume  &amp;&amp; chown ubuntu /opt/myvolume
WORKDIR /home/ubuntu
VOLUME /opt/myvolume


The creation of the directory has to be done as root (to be able to write within /opt).