Can we write compose file in json file instead of yam

Pragya Keshap answered on February 9, 2023 Popularity 2/10 Helpfulness 1/10

Contents


More Related Answers

  • docker compose import db dump
  • Laravel docker-compose.yml file example
  • The Docker Compose File
  • docker-compose env file
  • create docker-compose.yml from dockerfile
  • Changes in the Docker Compose files

  • Can we write compose file in json file instead of yam

    0

    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

    https://dockerlabs.collabnix.com/intermediate/workshop/DockerCompose/Lab_%2324_Use_JSON_instead_of_YAML_compose_file_in_Docker.html

    Popularity 2/10 Helpfulness 1/10 Language javascript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 09 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.