Docker Community Forums

Share and learn in the Docker community.

Creation of a volume in dockerfiles


(Erylis21) #1

I have a problem. In a container “kms6” I have a file recorded in the directory “record”. I need to record this file outside the container so I add in the dockerfile “VOLUME /record”.
Then I start the project with docker-compose who start the differents container. The file is recorded in the container and in the volume but the name of this volume is horrible. Is it possible to define the path and the name of this volume in the dockerfile or in the dockercompose.yml?