Skip to content

Conversation

Madh93
Copy link
Contributor

@Madh93 Madh93 commented Jan 23, 2021

Hi,

This is a possible implementation of #31 to bind the Edge and ElasticSearch ports to a custom port using the @LocalstackDockerProperties annotation:

Changes

  • Update RunCommand#withExposedPorts to pass ports like: "4567", ":4567" or "9876:4567"
  • Add portEdge and portElasticSearch properties
  • Add tests

Examples

Example of custom ports:

@LocalstackDockerProperties(portEdge = "45660", portElasticSearch = "45710", services = {"dynamodb"})
// public class ...

Example of random ports (alternative to the deprecated randomizePorts property):

@LocalstackDockerProperties(portEdge = ":4566", portElasticSearch = ":4571", services = {"dynamodb"})
// public class ...

Example of default ports (4566 and 4571):

@LocalstackDockerProperties(services = {"dynamodb"})
// public class ...

@whummer
Copy link
Member

whummer commented Jan 27, 2021

Looks great, thanks for this enhancement @Madh93 !! We'll release a new version to Maven Central shortly.. Thanks

@whummer whummer merged commit af668fa into localstack:master Jan 27, 2021
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

Successfully merging this pull request may close these issues.

2 participants