Can LocalStackContainer accept a ImageFromDockerfile
in constructor?
#7011
marco-luzzara
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am not sure whether this is a bug or not, but I am trying to temporarily build an image with
new ImageFromDockerfile()
and pass it to the constructor ofLocalStackContainer
. Unfortunately, this is not possible because the only allowed constructor accepts aDockerImageName
instance. Instead, theGenericContainer
allows you to write something like:Initially, I thought that I could just create the
DockerImageName
usingDockerImageName.parse()
, like this:But the test fails by timeout and logs repeatedly show
It is like it cannot find the image because not built yet.
First of all: is that expected? I looked at the source code of
LocalStackContainer
and introducing a new constructor for this case is definitely possible. Just likeGenericContainer
has this constructor definition:Can we add something like this in
LocalStackContainer
too?Or better, does an alternative exist for creating a localstack-compatible image from a Dockerfile and run it as a
@Container
?Environment:
OS: Windows
JDK: 17
TestContainer (and localstack module) version: 1.18.0
Beta Was this translation helpful? Give feedback.
All reactions