Skip to content

DockerIgnoreStrategy

Ignores file paths based on the .dockerignore specification.

Initializers

import com.aliyun.ros.cdk.core.DockerIgnoreStrategy;
new DockerIgnoreStrategy(java.lang.String absoluteRootPath, java.util.List<java.lang.String> patterns);
Name Type Description
absoluteRootPath java.lang.String No description.
patterns java.util.List No description.

absoluteRootPathRequired

  • Type: java.lang.String

patternsRequired

  • Type: java.util.List

Methods

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

add

public void add(java.lang.String pattern)

Adds another pattern.

patternRequired

  • Type: java.lang.String

ignores

public java.lang.Boolean ignores(java.lang.String absoluteFilePath)

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

absoluteFilePathRequired

  • Type: java.lang.String

absolute file path to be assessed against the pattern.


Static Functions

Name Description
docker Ignores file paths based on the .dockerignore specification.
fromCopyOptions 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 com.aliyun.ros.cdk.core.DockerIgnoreStrategy;
DockerIgnoreStrategy.docker(java.lang.String absoluteRootPath, java.util.List<java.lang.String> patterns)

Ignores file paths based on the .dockerignore specification.

absoluteRootPathRequired

  • Type: java.lang.String

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


patternsRequired

  • Type: java.util.List

fromCopyOptions

import com.aliyun.ros.cdk.core.DockerIgnoreStrategy;
DockerIgnoreStrategy.fromCopyOptions(CopyOptions options, java.lang.String absoluteRootPath)

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

optionsRequired

the CopyOptions to create the IgnoreStrategy from.


absoluteRootPathRequired

  • Type: java.lang.String

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


git

import com.aliyun.ros.cdk.core.DockerIgnoreStrategy;
DockerIgnoreStrategy.git(java.lang.String absoluteRootPath, java.util.List<java.lang.String> patterns)

Ignores file paths based on the .gitignore specification.

absoluteRootPathRequired

  • Type: java.lang.String

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


patternsRequired

  • Type: java.util.List

glob

import com.aliyun.ros.cdk.core.DockerIgnoreStrategy;
DockerIgnoreStrategy.glob(java.lang.String absoluteRootPath, java.util.List<java.lang.String> patterns)

Ignores file paths based on simple glob patterns.

absoluteRootPathRequired

  • Type: java.lang.String

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


patternsRequired

  • Type: java.util.List