dcontainer-1.0.9
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | dcontainer-1.0.9 |
| نام | dcontainer |
| نسخه کتابخانه | 1.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Daniel Braun |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/dcontainer/ |
| مجوز | - |
# 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"
```
نیازمندی
| مقدار | نام |
|---|---|
| ==1.10.7 | pydantic |
| - | typer |
| ==2.13.0 | semver |
| ==0.0.3 | easyfs |
| ==0.4.30 | nanolayer |
| - | pytest |
| - | pytest-shell-utilities |
| - | black |
| - | mypy |
| - | gitpython |
| - | build |
| - | setuptools |
| - | wheel |
| - | invoke |
| - | setuptools-scm |
| - | packaging |
نحوه نصب
نصب پکیج whl dcontainer-1.0.9:
pip install dcontainer-1.0.9.whl
نصب پکیج tar.gz dcontainer-1.0.9:
pip install dcontainer-1.0.9.tar.gz