Skip to main content

No project description provided

Project description

MiniLayer CLI

Installation

pip install minilayer[generate]

Feature Generation:

Usage: python -m minilayer 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 file with additional fields:

{   
    ...
    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

{
    ...


    "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 minilayer cli already installed

git clone https://github.com/devcontainers-contrib/cli --depth 1
cd cli


minilayer generate devcontainer-feature "./test/resources/test_feature_definitions/elixir-asdf/feature-definition.json" "./output_dir"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

minilayer-0.3.7-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file minilayer-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: minilayer-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for minilayer-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6112585b7bb798c3c012c523325f6913ef7cde3afd46d90d1bde0e3132dc2af2
MD5 4ea569df564910da23a597c56b37e433
BLAKE2b-256 77a7de811fddbbbc25d3d3b570a9028cdfd5943a28309f368acf120aa3bf4fc4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page