Can we write compose file in json file instead of yaml?

Yes. Yaml format is a superset of json format. Therefore any json file is also a valid Yaml file.

If we use a json file then we have to specify in docker command that we are using a json file as follows:

% docker-compose -f docker-compose.json up

Read the full book at www.amazon.com
Posted in Docker, Docker Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *

*