Few questions regarding docker image

greetings
as per title I have some questions about docker image:

  1. how can I give my own volume location to /var/lib/tomcat or /var/lib/postgresql
    I have tried giving -v /axelor/lib/tomcat:/var/lib/tomcat and others to my docker command
    the container starts but does not create/build DB or WAR file
  2. how can I create docker-compose.yml from the basic docker command:
    docker run -it -p 8080:80 axelor/aio-erp
    I have tried it but it does the same as in Q#1 scenario (the container starts but it does not create/build DB or WAR file)

here’s my docker command which is not working as it should:

docker run -it \
--name axelor \
-p 8080:80 \
-v /axelor/log/tomcat:/var/log/tomcat \
-v /axelor/log/postgresql/:/var/log/postgresql \
-v /axelor/lib/tomcat:/var/lib/tomcat \
-v /axelor/lib/postgresql/:/var/lib/postgresql \
axelor/aio-erp

any help here?
nobody is using docker here?

you got it?? you are missing war file in volume list