Docker volumes is hung in the configuration directory, how to write the default configuration of the container to the host directory?

volumes instruction of docker-compose used

is that I want to up a container. I use volumes to mount the configuration directory of the container to a directory of the host. The corresponding directory of the host is empty. I think the files of the corresponding directory of the container will be automatically written to the directory of the host, but in fact, the host directory is the main one. After mounting, it will empty the corresponding directory in the container.

how can I fulfill this need?

Sep.09,2021
Menu