Closed MikePadge closed 4 years ago
Why are the volumes listed again at the very bottom of the docker-compose file?
Because I wrote it that way. Also, why can't they be listed at the very bottom of the file? Did I violated your artistic vision with my code? Furthermore, there's nothing again about it. I declared the volumes at the bottom of the file, and I use them in my containers.
I've never seen a docker-compose file like this with the multiple volume listing
Maybe you haven't seen a lot of docker-compose
files then.
I've had difficulty finding documentation on the way the volumes are used here.
You can start from here. FYI, the example in that link literally has volumes
at the bottom of the file.
If I try to include my local ./images directory there, the compose up fails regex.
WHAT is "failed regex"?
You can try to fix this is to specify the full path of the images/
directory instead of ./images
. I'm pretty sure it won't work, but at least doing so will help you learn to type properly.
If possible, please make sure to format the docker-compose.yaml
file properly
Apologies for the dumb question. I have no artistic code visions. No I have not seen a lot of docker-compose files I am new with them and learning. I know that it creates an auto image if it doesn' texist. I just didn't understand why they need to be named twice in the compose.
But your link showed me what I was not understanding,
"The top-level volumes key defines a named volume and references it from each service’s volumes list. This replaces volumes_from in earlier versions of the Compose file format."
I was missing that looking in the wrong documentation place. Thank you for answering.
In regards to the attitude.
I have no artistic code visions
That is very true, and was clear from the very beginning. You also don't know where to put line break, how to use punctuation or how to properly format things in markdown.
But your link showed me what I was not understanding,
Wonderful. How much time did it take for your brain to comprehend the document in the link? If you had actually looked for that document and read it in the first place, how much time do you think it would have costed?
I was missing that looking in the wrong documentation place.
Yes, that is exactly the point.
P/S: Maybe you should try to come up with your own insult next time if you really want to make a point.
I've never seen a docker-compose file like this with the multiple volume listing, and I've had difficulty finding documentation on the way the volumes are used here.
I'd like to replace chevereto volumes with a local directory containing all of my images.
`version: '3'
services: db: image: mariadb volumes:
private environment: MYSQL_ROOT_PASSWORD: chevereto_root MYSQL_DATABASE: chevereto MYSQL_USER: chevereto MYSQL_PASSWORD: chevereto
chevereto: depends_on:
networks: private: volumes: database: chevereto_images:`
Why are the volumes listed again at the very bottom of the docker-compose file? If I try to include my local ./images directory there, the compose up fails regex.