Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always pulls new image regardless of setting on properties when running on Windows #61

Closed
jmaes12345 opened this issue Jun 17, 2021 · 2 comments
Assignees

Comments

@jmaes12345
Copy link

Using the annotation @LocalstackDockerProperties we should be able to set "pullNewImage" to false - indeed it should be false by default.

However, I have found running this on Windows always attempts to pull a new image, regardless of the setting.

I believe this is due to the check for whether the image exists within cloud.localstack.docker.Container line 71 checks if the list of images contains the image name but does not account for Windows line endings within the ListImagesCommand.execute() method as the list is split on \n only, leaving a \r at the end of the name which is not on the expected fullImageName.

I only noticed this was the expected behaviour when I was trying to work around this issue and noticed that the option didn't work!

Steps to reproduce:

  • Create a JUnit class annotated with:
@LocalstackDockerProperties(
		imageTag = "0.12.11",
		pullNewImage = false,
		services = { "s3" }
)
  • Run the JUnit

Expected:
The log message below is not produced:

cloud.localstack.docker.Container createLocalstackContainer
INFO: Pulling latest image...

Actual:
It is.

@whummer
Copy link
Member

whummer commented Jun 23, 2021

Thanks for reporting @jmaes12345 - this should be fixed in #65 . We have just released a new version 0.2.13 to Maven Central. Please let us know if the problem persists. Thanks!

@whummer whummer closed this as completed Jun 23, 2021
@jmaes12345
Copy link
Author

I just tried it with 0.2.13, and can confirm that it's fixed 😄
Thanks @pinzon and @whummer !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants