I used to think that until I figured out yaml and now yaml isn’t so bad.
It helps that text editors know what yaml is now so insert spaces when you hit tab etc
I used to think that until I figured out yaml and now yaml isn’t so bad.
It helps that text editors know what yaml is now so insert spaces when you hit tab etc
tuhriel@infosec.pub 6 hours ago
My biggest gripe with yaml (especially in docker-compose files) is that l, for me at least, it is absolutely not clear when I need to add dahes (-) in front of multiple entries and when it’s just linebreaks.
And there are no easy accessible docker-compose validators…
moonpiedumplings@programming.dev 1 hour ago
Try the yaml language server by red hat, it comes with a docker compose validator.
But in general, off the top of my head, dashes = list. No dashes is a dictionary.
So this is a list:
And this is a dictionary:
And then when they can be combined into a list of dictionaries.
And then abother thing to note is that yaml wilL convert things into a string. So if you have ports
8080:80
, this will be converted into a string, which is a clue that this is a string in a list, rather than a dictionary.moonpiedumplings@programming.dev 1 hour ago
Try the yaml language server by red hat, it comes with a docker compose validator.
But in general, off the top of my head, dashes = list. No dashes is a dictionary.
So this is a list:
And this is a dictionary:
And then when they can be combined into a list of dictionaries.
And then abother thing to note is that yaml wilL convert things into a string. So if you have ports
8080:80
, this will be converted into a string, which is a clue that this is a string in a list, rather than a dictionary.