Equivalent of docker run? #696
-
I would like to run a container in a similar way to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @dmurat. That's interesting I haven't heard of the One shot startup strategy being referred to as a However you can achieve the same outcome quite easily: const container = await new GenericContainer("alpine")
.withCommand("echo hello world")
.start() In this case the container will run the command and exit. |
Beta Was this translation helpful? Give feedback.
Hi @dmurat. That's interesting I haven't heard of the One shot startup strategy being referred to as a
docker run
equivalent before, but I see why it is. This startup strategy doesn't yet exist in testcontainers-node.However you can achieve the same outcome quite easily:
In this case the container will run the command and exit.