Name | dcontainer JSON |
Version | 1.0.12 JSON |
download | |
home_page | |
Summary | |
upload_time | 2023-08-23 12:11:31 |
maintainer | |
docs_url | None |
author | Daniel Braun |
requires_python | |
license | |
keywords | |
VCS | |
bugtrack_url | |
requirements | No requirements were recorded. |
Travis-CI | No Travis. |
coveralls test coverage | No coveralls. |
# dcontainer CLI ## Installation `pip install dcontainer` ### Feature Generation: ``` Usage: python -m dcontainer generate devcontainer-feature [OPTIONS] FEATURE_DEFINITION OUTPUT_DIR Arguments: FEATURE_DEFINITION [required] OUTPUT_DIR [required] Options: --help Show this message and exit. ``` Input for feature generation is a `feature-definition.json` file This is an *extended* version of the [devcontainer-feature.json](https://containers.dev/implementors/features/#devcontainer-feature-json-properties) file with *additional fields*: ```yaml { ... regular devcontainer-json fields like id, name, description etc ... # dependencies are list of features and options (those will be installed as prerequisites to your feature) "dependencies": [ { "feature": "ghcr.io/devcontainers-contrib/features/asdf-package:latest", "options": { "plugin": "act", "version": "latest" } } ], # This command will be executed after the dependency feature list has been installed "install_command": "echo 'Done'", # this example test scenario checks the default options (empty options dict), each test_command should exit wth code `0` if your feature is installed correctly. "test_scenarios": [ { "name": "test_defaults", "image": "mcr.microsoft.com/devcontainers/base:debian", "test_commands": [ "act --version" ], "options": {} } ] } ``` #### redirect input ```yaml { ... "options": { "version": { "type": "string", "default": "latest", "description": "Select the version of act to install2." } }, # you can also redirect one of your actual devcontainer-feature.json options values into a dependency input, note the `$options.version` pointer to the asdf-package version option "dependencies": [ { "feature": "ghcr.io/devcontainers-contrib/features/asdf-package:latest", "options": { "plugin": "act", "version": "$options.version" } } ], ... } ``` ### Usage example this will generate the Elixir feature It assumes you have the dcontainer cli already installed ```sh git clone https://github.com/devcontainers-contrib/cli --depth 1 cd cli dcontainer generate devcontainer-feature "./test/resources/test_feature_definitions/elixir-asdf/feature-definition.json" "./output_dir" ```
{ "_id": null, "home_page": "", "name": "dcontainer", "maintainer": "", "docs_url": null, "requires_python": "", "maintainer_email": "", "keywords": "", "author": "Daniel Braun", "author_email": "", "download_url": "", "platform": null, "description": "# dcontainer CLI\n\n\n## Installation\n\n\n`pip install dcontainer`\n\n\n### Feature Generation:\n\n```\nUsage: python -m dcontainer generate devcontainer-feature [OPTIONS]\n FEATURE_DEFINITION\n OUTPUT_DIR\n\nArguments:\n FEATURE_DEFINITION [required]\n OUTPUT_DIR [required]\n\nOptions:\n --help Show this message and exit.\n```\n\n\nInput for feature generation is a `feature-definition.json` file\nThis is an *extended* version of the [devcontainer-feature.json](https://containers.dev/implementors/features/#devcontainer-feature-json-properties) file with *additional fields*:\n\n```yaml\n{ \n ...\n regular devcontainer-json fields like id, name, description etc\n ...\n\n\n # dependencies are list of features and options (those will be installed as prerequisites to your feature)\n \"dependencies\": [\n {\n \"feature\": \"ghcr.io/devcontainers-contrib/features/asdf-package:latest\",\n \"options\": {\n \"plugin\": \"act\",\n\n \"version\": \"latest\"\n }\n }\n ],\n\n # This command will be executed after the dependency feature list has been installed\n \"install_command\": \"echo 'Done'\",\n\n # this example test scenario checks the default options (empty options dict), each test_command should exit wth code `0` if your feature is installed correctly.\n \"test_scenarios\": [\n {\n \"name\": \"test_defaults\",\n \"image\": \"mcr.microsoft.com/devcontainers/base:debian\",\n \"test_commands\": [\n \"act --version\"\n ],\n \"options\": {}\n }\n ]\n}\n```\n\n#### redirect input\n\n```yaml\n{\n ...\n\n\n \"options\": {\n \"version\": {\n \"type\": \"string\",\n \"default\": \"latest\",\n \"description\": \"Select the version of act to install2.\"\n }\n },\n\n # you can also redirect one of your actual devcontainer-feature.json options values into a dependency input, note the `$options.version` pointer to the asdf-package version option\n \"dependencies\": [\n {\n \"feature\": \"ghcr.io/devcontainers-contrib/features/asdf-package:latest\",\n \"options\": {\n \"plugin\": \"act\",\n \"version\": \"$options.version\"\n }\n }\n ],\n\n ...\n}\n```\n\n### Usage example\n\n\nthis will generate the Elixir feature \nIt assumes you have the dcontainer cli already installed\n\n```sh\ngit clone https://github.com/devcontainers-contrib/cli --depth 1\ncd cli\n\n\ndcontainer generate devcontainer-feature \"./test/resources/test_feature_definitions/elixir-asdf/feature-definition.json\" \"./output_dir\"\n```\n", "bugtrack_url": null, "license": "", "summary": "", "version": "1.0.12", "project_urls": null, "split_keywords": [], "urls": [ { "comment_text": "", "digests": { "blake2b_256": "a45855e76d27171c5b4da1a19bb7b49574fc2f6588a884a685aa3db61efb043f", "md5": "4f214e6a62bca59353ff0083118ad1bd", "sha256": "976c9cd56f843ef2f034d1f6876734c5c42c56311bc7391ee2fc9c84492d0f06" }, "downloads": -1, "filename": "dcontainer-1.0.12-py3-none-any.whl", "has_sig": false, "md5_digest": "4f214e6a62bca59353ff0083118ad1bd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17937, "upload_time": "2023-08-23T12:11:31", "upload_time_iso_8601": "2023-08-23T12:11:31.841834Z", "url": "https://files.pythonhosted.org/packages/a4/58/55e76d27171c5b4da1a19bb7b49574fc2f6588a884a685aa3db61efb043f/dcontainer-1.0.12-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "upload_time": "2023-08-23 12:11:31", "github": false, "gitlab": false, "bitbucket": false, "codeberg": false, "lcname": "dcontainer" }