deps_rocker.dependencies
Classes
The base class for Rocker extension points |
Module Contents
- class deps_rocker.dependencies.Dependencies
Bases:
rocker.extensions.RockerExtensionThe base class for Rocker extension points
- name = 'deps'
- deps_files = []
- dependencies
- layers_preamble
- layers
- layers_user
- dep_group_order
- empy_args
- all_files
- parsed = False
- classmethod get_name()
- invoke_after(cliargs) Set[str]
This extension should be loaded after the extensions in the returned set. These extensions are not required to be present, but if they are, they will be loaded before this extension.
- setup_deps(cliargs)
- read_dependencies(path: pathlib.Path, pattern: str)
Recursively load all deps.yaml and create a dictionary containing sets of each type of dependency. Each type of dependency (apt_base, apt etc) should have duplicates rejected when adding to the set
- get_deps(key: str, as_list: bool = False) str
Given a dependency key return a space delimited string of dependencies
- Parameters:
key (str) – A type of dependency e.g apt
- Returns:
space delimited dependencies
- Return type:
str
- get_files(cliargs) dict
Get a dict of local filenames and content to write into them
- add_file(filename: str, content: str) None
Create a file on the users host machine to be copied into the docker context. This also updates the empy_args dictionary with True if that file is generated. The empy_args are used to determine if a snipped related to that file should be generated or not.
- Parameters:
filename (str) – name of file to create
content (str) – the contents of the file
- get_scripts(name: str) str
collect all scripts files into a single script
- Parameters:
name (str) – name of the scripts key and output script name
- Returns:
All scripts combined into a single script
- Return type:
str
- get_pyproject_toml_deps() str
Recursively load all dependencies from pyproject.toml”
- Returns:
Space delimited string of dependencies
- Return type:
str
- get_preamble(cliargs)
- get_snippet(cliargs=None)
Get a dockerfile snippet to be executed as ROOT.
- get_user_snippet(cliargs)
Get a dockerfile snippet to be executed after switching to the expected USER.
- static register_arguments(parser, defaults=None)