Volume folder created with a root permissions

I added volume into the docker-compose. This volume pointing to the docker’s host folder that doesn’t exist. When I runed my container the directory created on the host with root permissions. Is there a way to create this folder with docker’s user (web) permissions?

Here’s my Dockerfile

FROM ubuntu:19.04

RUN addgroup --gid 1000 web
RUN adduser -u 1000 --disabled-password --gecos "" --force-badname --ingroup web web
RUN mkdir /opt/web  && chown -R web:web /opt/web

VOLUME /opt/web

USER web

CMD echo 'started'

My docker-compose.yaml file

version: '3.7'
    image: test:latest
    container_name: web
      context: .
      - ./host_web:/opt/web

and command I run my container

$ docker-compose run --rm web ls -l /opt
total 4
drwxr-xr-x 2 root root 4096 Jan 22 06:24 web

$ ll | grep host_web
drwxr-xr-x  2 root    root    4096 Jan 22 09:24 host_web/

Source: StackOverflow