I use TestContainers with ibm mq image in it. Through config I set host, port, user=app, default passw0rd, manager = QM1. I also have more custom queues and besides default DEV.QUEUE.1 - 3 ,created by container, I gotta start up mine. I found such operator like withCommand, accepting String argument, and try to set it like
.withCommand("sh","-c","runmqsc QM1 | define qlocal(LQ1) | end")
https://www.ibm.com/docs/en/ibm-mq/7.5?topic=75-creating-queue-called-lq1
Unfortunately, it seems not starting with it.
My full snap of code related:
@Container
static GenericContainer<?> mqContainer = new GenericContainer<>(DockerImageName.parse("ibmcom/mq"))
.withEnv("LICENSE", "accept")
.withEnv("MQ_QMGR_NAME", "QM1")
/* .withCommand("sh","-c","runmqsc")*/
.withExposedPorts(1414)
.withStartupTimeout(Duration.of(1, ChronoUnit.HALF_DAYS))
.withLogConsumer(new Slf4jLogConsumer(log));