88 lines
2.9 KiB
Markdown
88 lines
2.9 KiB
Markdown
# MQ configurations
|
|
## Building own image
|
|
```bash
|
|
docker stop QM1
|
|
docker rm QM1
|
|
|
|
docker image rm mqtest:latest
|
|
docker image prune --force
|
|
docker buildx build -t mqtest:latest .
|
|
|
|
# echo "admin" | docker secret create MQ_ADMIN_USER -
|
|
# echo "passw0rd" | docker secret create MQ_ADMIN_PASSWORD -
|
|
|
|
docker run \
|
|
--name QM1 \
|
|
--env LICENSE=accept \
|
|
--env MQ_QMGR_NAME=QM1 \
|
|
--env MQ_APP_USER=app \
|
|
--env MQ_DEV=FALSE \
|
|
--env MQ_APP_PASSWORD=passw0rd \
|
|
--env MQ_ADMIN_USER=admin \
|
|
--env MQ_ADMIN_PASSWORD=passw0rd \
|
|
--env MQ_ENABLE_METRICS=true \
|
|
--publish 1414:1414 \
|
|
--publish 9443:9443 \
|
|
--publish 9157:9157 \
|
|
--detach \
|
|
mqtest:latest
|
|
```
|
|
### Environment variables supported by this image
|
|
|
|
* LICENSE - Set this to `accept` to agree to the MQ Advanced for Developers license. If you wish to see the license you can set this to `view`.
|
|
* LANG - Set this to the language you would like the license to be printed in.
|
|
* MQ_QMGR_NAME - Set this to the name you want your Queue Manager to be created with.
|
|
* MQ_QMGR_LOG_FILE_PAGES - Set this to control the value for LogFilePages passed to the "crtmqm" command. Cannot be changed after queue manager creation.
|
|
* MQ_LOGGING_CONSOLE_SOURCE - Specifies a comma-separated list of sources for logs which are mirrored to the container's stdout. The valid values are "qmgr", "web" and "mqsc". Defaults to "qmgr,web".
|
|
* MQ_LOGGING_CONSOLE_FORMAT - Changes the format of the logs which are printed on the container's stdout. Set to "json" to use JSON format (JSON object per line); set to "basic" to use a simple human-readable format. Defaults to "basic".
|
|
* MQ_LOGGING_CONSOLE_EXCLUDE_ID - Excludes log messages with the specified ID. The log messages still appear in the log file on disk, but are excluded from the container's stdout. Defaults to "AMQ5041I,AMQ5052I,AMQ5051I,AMQ5037I,AMQ5975I".
|
|
* MQ_ENABLE_METRICS - Set this to `true` to generate Prometheus metrics for your Queue Manager.
|
|
|
|
|
|
## Running with the default configuration
|
|
```bash
|
|
docker run \
|
|
--env LICENSE=accept \
|
|
--env MQ_QMGR_NAME=QM1 \
|
|
--env MQ_ENABLE_METRICS=true \
|
|
--publish 1414:1414 \
|
|
--publish 9443:9443 \
|
|
--publish 9157:9157 \
|
|
--detach \
|
|
icr.io/ibm-messaging/mq
|
|
```
|
|
|
|
## Running with the default configuration and a volume
|
|
```bash
|
|
docker volume create qm1data
|
|
|
|
You can then run a queue manager using this volume as follows:
|
|
|
|
docker run \
|
|
--env LICENSE=accept \
|
|
--env MQ_QMGR_NAME=QM1 \
|
|
--publish 1414:1414 \
|
|
--publish 9443:9443 \
|
|
--detach \
|
|
--volume qm1data:/mnt/mqm \
|
|
icr.io/ibm-messaging/mq
|
|
```
|
|
|
|
## Running with a read-only root filesystem
|
|
```bash
|
|
docker volume create qm1data
|
|
docker volume create run
|
|
docker volume create tmp
|
|
|
|
docker run \
|
|
--env LICENSE=accept \
|
|
--env MQ\_QMGR\_NAME=QM1 \
|
|
--mount type=volume,source=run,destination=/run \
|
|
--mount type=volume,source=tmp,destination=/tmp \
|
|
--mount type=volume,source=qm1data,destination=/mnt/mqm \
|
|
--read-only \
|
|
--publish 1414:1414 \
|
|
--detach \
|
|
icr.io/ibm-messaging/mq
|
|
```
|