===JSON settings w.r.t. launching Docker Container=== Below are the details provided for the JSON specs which are required for launching container. These JSON specs are used to create a Docker Compose YAML file in the background, therefore it will have many attributes similar to the Docker Compose YAML. To make the explanation simple, below is pasted a working spec. The explanation follows subsequently. The keys which begin with an underscore are treated as comments. { "repo_name":"custom-image-c001", "tag_name":"latest", "_image_file_path":"if image_file_path is empty or not present, then the repo should be available at the docker hub", "image_file_path":"/home/example/custom-image-c001.img", "container_entry_point":"node", "container_cmd":"/home/example/fldr1/sub-fld1/bg.js", "container_user":"example", "container_volumes":[ "_ Below entry denotes /home/example/fldr1/sub-fld1 . will be mounted by same name in container", "/home/example/fldr1/sub-fld1", "_ Below entry denotes /home/example/fldr1/sub-fld2 mounted as /var/nfolder in container", "/home/example/fldr1/sub-fld2:/var/nfolder" ], "_container_port":"optional - port number of the app", "container_port":3000, "_vhost":"Its an optional entry, buy required if required to be access from the webserver", "vhost":"apps.example.com", "_vhost_url":"Can be empty or whatever the URL be. It should not be used in any context like regulay, node apps or python apps", "vhost_url":"/apps/102", "_open_port":"Optional. The port to be opened and which will be mapped to a the container port", "open_port":2093 } * **repo_name** - required - It is actually the image name. * **tag_name** - optional - The tag associate with the repo/image. If no tag is specified, 'latest' is assumed. * **image_file_path** - optional - If this attribute is not provided, the system will try to pull the image from the Docker Hub. But when it is provided, it will try to load image(s) from the specified file. * **container_entry_point** - conditional - If provided, will be used as the entry point in Docker's YAML file * **container_cmd** - conditional - If provided, will be used as the command in Docker's YAML file.\\ **Important : ** Either container_entry_point or container_cmd have to be provided. For a detailed reference, please follow this link - https://www.docker.com/blog/docker-best-practices-choosing-between-run-cmd-and-entrypoint/ . There are two formats to write these instructions - shell and exec. Both have been elaborated in that link. If you are using double quotes in between , you need to escape the same using \" . For. e.g. "container_entry_point":"[\"node\", \"/home/cncn99/node_apps/app5/server.js\"]", * **container_user** - required - The system user under which the container runs. * **container_volumes** - optional - An array of system folders which are made accessible to the container * * e.g. the entry of /home/example/fldr1/sub-fld1 will be made accessible to the container as the same path * * e.g. the entry of /home/example/fldr1/sub-fld2:/var/nfolder will make the folder /home/example/fldr1/sub-fld2 accessible as /var/nfolder to the container * **container_port** - optional - The port within the container on which your application runs * **vhost** - conditional - Associated VHost/Website which should be linked to container through the vhost_url at one end and container_port on the other end. * **vhost_url** - conditional - If vhost is used * **open_port** - optional - The port via which the container will be accessible to the world. If this attribute is present , then container_port is also required.