2

Snippet of my docker-compose.yml

   ports:
      -  "5000:5000"
    volumes:
      - "./:/code"
      - "${HOST_FILESTORAGE_PATH}:${DOCKER_FILESTORAGE_PATH}"

Problem is, this second volume will only be needed on certain cases, in other cases I don't need it.

Solutions I thought of :

  1. If I don't need it, substitute HOST_FILE_STORAGE_PATH and DOCKER_FILESTORAGE_PATH for values that won't make a difference nor break anything, which value could this be?
  2. Instead of using variables on docker-compose, is it possible to pass additional volumes when running docker-compose up/run?
Mojimi
  • 2,561
  • 9
  • 52
  • 116

0 Answers0