Show / Hide Table of Contents

Class DockerCacheOption

Options for configuring the Docker cache backend.

Inheritance
object
DockerCacheOption
Implements
IDockerCacheOption
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DockerCacheOption : IDockerCacheOption
Syntax (vb)
Public Class DockerCacheOption Implements IDockerCacheOption
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;

            var dockerCacheOption = new DockerCacheOption {
                Type = "type",

                // the properties below are optional
                Params = new Dictionary<string, string> {
                    { "paramsKey", "params" }
                }
            };

Synopsis

Constructors

DockerCacheOption()

Options for configuring the Docker cache backend.

Properties

Params

Any parameters to pass into the docker cache backend configuration.

Type

The type of cache to use.

Constructors

DockerCacheOption()

Options for configuring the Docker cache backend.

public DockerCacheOption()
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;

            var dockerCacheOption = new DockerCacheOption {
                Type = "type",

                // the properties below are optional
                Params = new Dictionary<string, string> {
                    { "paramsKey", "params" }
                }
            };

Properties

Params

Any parameters to pass into the docker cache backend configuration.

public IDictionary<string, string>? Params { get; set; }
Property Value

IDictionary<string, string>

Remarks

Refer to https://docs.docker.com/build/cache/backends/ for cache backend configuration.

Default: {} No options provided

Examples
string branch;


             IDictionary<string, object> params = new Dictionary<string, object> {
                 { "ref", $"12345678.dkr.ecr.us-west-2.amazonaws.com/cache:{branch}" },
                 { "mode", "max" }
             };

Type

The type of cache to use.

public string Type { get; set; }
Property Value

string

Remarks

Refer to https://docs.docker.com/build/cache/backends/ for full list of backends.

Default: - unspecified

Examples
"registry";

Implements

IDockerCacheOption
Back to top Generated by DocFX