Skip to content

Instantly share code, notes, and snippets.

@shelajev
Created March 25, 2019 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shelajev/c7c6a5d87a76e74e3db9725c85d370c5 to your computer and use it in GitHub Desktop.
Save shelajev/c7c6a5d87a76e74e3db9725c85d370c5 to your computer and use it in GitHub Desktop.
Using test-containers-java from Python (GraalVM)
import java
generic = java.type('org.testcontainers.containers.GenericContainer')
container = generic('nginx')
container.setExposedPorts([80])
container.start();
print('%s:%s' % (container.getContainerIpAddress(), container.getMappedPort(80)));
@loiclefevre
Copy link

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment