You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 5, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,9 @@ You need to make sure that you either have a Linux kernel version of V3.16, or e
11
11
# Build
12
12
After extracting the code from this repository, you can build the image using the following command:
13
13
14
-
~~~
14
+
```
15
15
sudo docker build --tag mq ./8.0.0/
16
-
~~~
16
+
```
17
17
18
18
# Usage
19
19
In order to use the image, it is necessary to accept the terms of the IBM MQ license. This is achieved by specifying the environment variable `LICENSE` equal to `accept` when running the image. You can also view the license terms by setting this variable to `view`. Failure to set the variable will result in the termination of the container with a usage statement. You can view the license in a different language by also setting the `LANG` environment variable.
@@ -23,15 +23,15 @@ This image is primarily intended to be used as an example base image for your ow
23
23
## Running with the default configuration
24
24
You can run a queue manager with the default configuration and a listener on port 1414 using the following command. Note that the default configuration is locked-down from a security perspective, so you will need to customize the configuration in order to effectively use the queue manager. For example, the following command creates and starts a queue manager called `QM1`, and maps port 1414 on the host to the MQ listener on port 1414 inside the container:
25
25
26
-
~~~
26
+
```
27
27
sudo docker run \
28
28
--env LICENSE=accept \
29
29
--env MQ_QMGR_NAME=QM1 \
30
30
--volume /var/example:/var/mqm \
31
31
--publish 1414:1414 \
32
32
--detach \
33
33
mq
34
-
~~~
34
+
```
35
35
36
36
Note that in this example, the name "mq" is the image tag you used in the previous build step.
37
37
@@ -47,34 +47,34 @@ Note that a listener is always created on port 1414 inside the container. This
47
47
48
48
The following is an *example*`Dockerfile` for creating your own pre-configured image, which adds a custom `config.mqsc` and an administrative user `alice`. Note that it is not normally recommended to include passwords in this way:
49
49
50
-
~~~
50
+
```dockerfile
51
51
FROM mq
52
52
RUN useradd alice -G mqm && \
53
53
echo alice:passw0rd | chpasswd
54
54
COPY config.mqsc /etc/mqm/
55
-
~~~
55
+
```
56
56
57
57
Here is an example corresponding `config.mqsc` script from the [mqdev blog](https://www.ibm.com/developerworks/community/blogs/messaging/entry/getting_going_without_turning_off_mq_security?lang=en), which allows users with passwords to connect on the `PASSWORD.SVRCONN` channel:
58
58
59
-
~~~
59
+
```
60
60
DEFINE CHANNEL(PASSWORD.SVRCONN) CHLTYPE(SVRCONN)
61
61
SET CHLAUTH(PASSWORD.SVRCONN) TYPE(BLOCKUSER) USERLIST('nobody') DESCR('Allow privileged users on this channel')
62
62
SET CHLAUTH('*') TYPE(ADDRESSMAP) ADDRESS('*') USERSRC(NOACCESS) DESCR('BackStop rule')
63
63
SET CHLAUTH(PASSWORD.SVRCONN) TYPE(ADDRESSMAP) ADDRESS('*') USERSRC(CHANNEL) CHCKCLNT(REQUIRED)
64
64
ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) ADOPTCTX(YES)
65
65
REFRESH SECURITY TYPE(CONNAUTH)
66
-
~~~
66
+
```
67
67
68
68
## Running MQ commands
69
69
It is recommended that you configure MQ in your own custom image. However, you may need to run MQ commands directly inside the process space of the container. To run a command against a running queue manager, you can use `docker exec`, for example:
70
70
71
-
~~~
71
+
```
72
72
sudo docker exec \
73
73
--tty \
74
74
--interactive \
75
75
${CONTAINER_ID} \
76
76
dspmq
77
-
~~~
77
+
```
78
78
79
79
Using this technique, you can have full control over all aspects of the MQ installation. Note that if you use this technique to make changes to the filesystem, then those changes would be lost if you re-created your container unless you make those changes in volumes.
80
80
@@ -88,9 +88,9 @@ This image includes the core MQ server, Java, language packs, and GSKit. Other
88
88
## Container command not found or does not exist
89
89
This message also appears as "System error: no such file or directory" in some versions of Docker. This can happen using Docker Toolbox on Windows, and is related to line-ending characters. When you clone the Git repository on Windows, Git is often configured to convert any UNIX-style LF line-endings to Windows-style CRLF line-endings. Files with these line-endings end up in the built Docker image, and cause the container to fail at start-up. One solution to this problem is to stop Git from converting the line-ending characters, with the following command:
90
90
91
-
~~~
91
+
```
92
92
git config --global core.autocrlf input
93
-
~~~
93
+
```
94
94
95
95
## `mqconfig` fails
96
96
When the container starts, it runs `mqconfig` to check the environment is OK. IBM MQ requires some kernel parameters to be set to particular values, which are not the default on many systems. You can fix this by issuing `sysctl` commands to configure the kernel. For example, to set the maximum number of open files, use `sysctl fs.file-max=524288`. See the section on "Preparing your Docker host" above for more details.
0 commit comments