Class EcrConfig
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfig<EcrConfig.Builder>
io.floci.testcontainers.config.services.EcrConfig
Configuration for ECR-specific container settings.
Instances are created via EcrConfig.Builder:
EcrConfig config = EcrConfig.builder()
.enabled(true)
.registryPortRange(5000, 100)
.registryImage("registry:2")
.build();
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class io.floci.testcontainers.config.services.AbstractServiceConfig
DEFAULT_ENABLED -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEnvVarsToContainer(org.testcontainers.containers.Container<?> container) Applies this service configuration to the given container by setting the appropriate environment variables.voidapplyExposedPortsToContainer(org.testcontainers.containers.Container<?> container) Applies this service configuration to the given container by exposing the appropriate ports.static EcrConfig.Builderbuilder()Returns a newEcrConfig.Builderfor this configuration.Returns the Docker network used for ECR registry containers, ornullif not set.intReturns the base port for the ECR registry port range.Returns the container name for the ECR registry.Returns the Docker image used for the ECR registry.intReturns the maximum port for the ECR registry port range.intReturns the number of ports allocated for the ECR registry, starting fromgetRegistryBasePort().Returns the URI style for repositoryUri responses.booleanReturns whether TLS is enabled for the ECR registry.Returns a newEcrConfig.Builderfor this configuration, initialized with the current values of this instance.Methods inherited from class io.floci.testcontainers.config.services.AbstractServiceConfig
isEnabled
-
Method Details
-
builder
Returns a newEcrConfig.Builderfor this configuration.- Returns:
- a new builder
-
toBuilder
Returns a newEcrConfig.Builderfor this configuration, initialized with the current values of this instance.- Specified by:
toBuilderin classAbstractServiceConfig<EcrConfig.Builder>- Returns:
- a new builder pre-populated with this configuration's values
-
getRegistryImage
Returns the Docker image used for the ECR registry.- Returns:
- the registry image name
-
getRegistryContainerName
Returns the container name for the ECR registry.- Returns:
- the registry container name
-
getRegistryBasePort
public int getRegistryBasePort()Returns the base port for the ECR registry port range.- Returns:
- the base port
-
getRegistryPortsCount
public int getRegistryPortsCount()Returns the number of ports allocated for the ECR registry, starting fromgetRegistryBasePort().- Returns:
- the number of registry ports
-
getRegistryMaxPort
public int getRegistryMaxPort()Returns the maximum port for the ECR registry port range.- Returns:
- the maximum port
-
isTlsEnabled
public boolean isTlsEnabled()Returns whether TLS is enabled for the ECR registry.- Returns:
trueif TLS is enabled
-
getUriStyle
Returns the URI style for repositoryUri responses.- Returns:
"hostname"or"path"
-
getDockerNetwork
Returns the Docker network used for ECR registry containers, ornullif not set.- Returns:
- the Docker network name, or
null
-
applyEnvVarsToContainer
public void applyEnvVarsToContainer(org.testcontainers.containers.Container<?> container) Description copied from class:AbstractServiceConfigApplies this service configuration to the given container by setting the appropriate environment variables.- Overrides:
applyEnvVarsToContainerin classAbstractServiceConfig<EcrConfig.Builder>- Parameters:
container- the container to configure
-
applyExposedPortsToContainer
public void applyExposedPortsToContainer(org.testcontainers.containers.Container<?> container) Description copied from class:AbstractServiceConfigApplies this service configuration to the given container by exposing the appropriate ports.- Overrides:
applyExposedPortsToContainerin classAbstractServiceConfig<EcrConfig.Builder>- Parameters:
container- the container to configure
-