Skip to content

DockerIgnoreStrategy

Ignores file paths based on the .dockerignore specification.

Initializers

import ros_cdk_core
ros_cdk_core.DockerIgnoreStrategy(
  absolute_root_path: str,
  patterns: typing.List[str]
)
Name Type Description
absolute_root_path str No description.
patterns typing.List[str] No description.

absolute_root_pathRequired

  • Type: str

patternsRequired

  • Type: typing.List[str]

Methods

Name Description
add Adds another pattern.
ignores Determines whether a given file path should be ignored or not.

add

def add(
  pattern: str
) -> None

Adds another pattern.

patternRequired

  • Type: str

ignores

def ignores(
  absolute_file_path: str
) -> bool

Determines whether a given file path should be ignored or not.

absolute_file_pathRequired

  • Type: str

absolute file path to be assessed against the pattern.


Static Functions

Name Description
docker Ignores file paths based on the .dockerignore specification.
from_copy_options Creates an IgnoreStrategy based on the ignoreMode and exclude in a CopyOptions.
git Ignores file paths based on the .gitignore specification.
glob Ignores file paths based on simple glob patterns.

docker

import ros_cdk_core
ros_cdk_core.DockerIgnoreStrategy.docker(
  absolute_root_path: str,
  patterns: typing.List[str]
)

Ignores file paths based on the .dockerignore specification.

absolute_root_pathRequired

  • Type: str

the absolute path to the root directory of the paths to be considered.


patternsRequired

  • Type: typing.List[str]

from_copy_options

import ros_cdk_core
ros_cdk_core.DockerIgnoreStrategy.from_copy_options(
  exclude: typing.List[str] = None,
  follow: SymlinkFollowMode = None,
  ignore_mode: IgnoreMode = None,
  absolute_root_path: str
)

Creates an IgnoreStrategy based on the ignoreMode and exclude in a CopyOptions.

excludeOptional

  • Type: typing.List[str]
  • Default: nothing is excluded

File paths matching the patterns will be excluded.

See ignoreMode to set the matching behavior. Has no effect on Assets bundled using the bundling property.


followOptional

A strategy for how to handle symlinks.


ignore_modeOptional

The ignore behavior to use for exclude patterns.


absolute_root_pathRequired

  • Type: str

the absolute path to the root directory of the paths to be considered.


git

import ros_cdk_core
ros_cdk_core.DockerIgnoreStrategy.git(
  absolute_root_path: str,
  patterns: typing.List[str]
)

Ignores file paths based on the .gitignore specification.

absolute_root_pathRequired

  • Type: str

the absolute path to the root directory of the paths to be considered.


patternsRequired

  • Type: typing.List[str]

glob

import ros_cdk_core
ros_cdk_core.DockerIgnoreStrategy.glob(
  absolute_root_path: str,
  patterns: typing.List[str]
)

Ignores file paths based on simple glob patterns.

absolute_root_pathRequired

  • Type: str

the absolute path to the root directory of the paths to be considered.


patternsRequired

  • Type: typing.List[str]