From 48bbd91780717b88372f2bbf46246e04445cbd4b Mon Sep 17 00:00:00 2001 From: Jason Bennett Date: Thu, 10 Jun 2021 11:07:32 -0700 Subject: [PATCH] Log which image is being pulled --- README.md | 4 ++-- src/main/java/cloud/localstack/docker/Container.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5901732..e521084 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,8 @@ You can configure the Docker behaviour using the `@LocalstackDockerProperties` a | `portElasticSearch` | Port number for the elasticsearch service | String | `4571` | | `hostNameResolver` | Used for determining the host name of the machine running the docker containers so that the containers can be addressed. | IHostNameResolver | `localhost` | | `environmentVariableProvider` | Used for injecting environment variables into the container. | IEnvironmentVariableProvider | Empty Map | -| `bindMountProvider | Used bind mounting files and directories into the container, useful to run init scripts before using the container. | IBindMountProvider | Empty Map | -| initializationToken | Give a regex that will be searched in the logstream of the container, start is complete only when the token is found. Use with bindMountProvider to execute init scripts. | String | Empty String | +| `bindMountProvider` | Used bind mounting files and directories into the container, useful to run init scripts before using the container. | IBindMountProvider | Empty Map | +| `initializationToken` | Give a regex that will be searched in the logstream of the container, start is complete only when the token is found. Use with bindMountProvider to execute init scripts. | String | Empty String | | `useSingleDockerContainer` | Whether a singleton container should be used by all test classes. | boolean | `false` | For more details, please refer to the README of the main LocalStack repo: https://github.com/localstack/localstack diff --git a/src/main/java/cloud/localstack/docker/Container.java b/src/main/java/cloud/localstack/docker/Container.java index 0aed768..e0e6598 100644 --- a/src/main/java/cloud/localstack/docker/Container.java +++ b/src/main/java/cloud/localstack/docker/Container.java @@ -75,7 +75,7 @@ public static Container createLocalstackContainer( + ":" + LOCALSTACK_PORT_ELASTICSEARCH; if(pullNewImage || !imageExists) { - LOG.info("Pulling latest image..."); + LOG.info(String.format("Pulling image %s", fullImageName)); new PullCommand(imageNameOrDefault, imageTag).execute(); } @@ -84,7 +84,7 @@ public static Container createLocalstackContainer( .withExposedPorts(fullPortElasticSearch, randomizePorts) .withEnvironmentVariable(LOCALSTACK_EXTERNAL_HOSTNAME, externalHostName) .withEnvironmentVariable(ENV_DEBUG, ENV_DEBUG_DEFAULT) - .withEnvironmentVariable(ENV_USE_SSL, Localstack.INSTANCE.useSSL() ? "1" : "0") + .withEnvironmentVariable(ENV_USE_SSL, Localstack.useSSL() ? "1" : "0") .withEnvironmentVariables(environmentVariables) .withBindMountedVolumes(bindMounts); @@ -92,7 +92,7 @@ public static Container createLocalstackContainer( runCommand = runCommand.withPlatform(platform); for (Integer port : portMappings.keySet()) { - runCommand = runCommand.withExposedPorts("" + port, false); + runCommand = runCommand.withExposedPorts(String.valueOf(port), false); } String containerId = runCommand.execute(); LOG.info("Started container: " + containerId);