Skip to content
This repository was archived by the owner on May 5, 2020. It is now read-only.

Commit 026b137

Browse files
committed
Update markdown syntax highlighting
1 parent c8d808d commit 026b137

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ You need to make sure that you either have a Linux kernel version of V3.16, or e
1111
# Build
1212
After extracting the code from this repository, you can build the image using the following command:
1313

14-
~~~
14+
```
1515
sudo docker build --tag mq ./8.0.0/
16-
~~~
16+
```
1717

1818
# Usage
1919
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
2323
## Running with the default configuration
2424
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:
2525

26-
~~~
26+
```
2727
sudo docker run \
2828
--env LICENSE=accept \
2929
--env MQ_QMGR_NAME=QM1 \
3030
--volume /var/example:/var/mqm \
3131
--publish 1414:1414 \
3232
--detach \
3333
mq
34-
~~~
34+
```
3535

3636
Note that in this example, the name "mq" is the image tag you used in the previous build step.
3737

@@ -47,34 +47,34 @@ Note that a listener is always created on port 1414 inside the container. This
4747

4848
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:
4949

50-
~~~
50+
```dockerfile
5151
FROM mq
5252
RUN useradd alice -G mqm && \
5353
echo alice:passw0rd | chpasswd
5454
COPY config.mqsc /etc/mqm/
55-
~~~
55+
```
5656

5757
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:
5858

59-
~~~
59+
```
6060
DEFINE CHANNEL(PASSWORD.SVRCONN) CHLTYPE(SVRCONN)
6161
SET CHLAUTH(PASSWORD.SVRCONN) TYPE(BLOCKUSER) USERLIST('nobody') DESCR('Allow privileged users on this channel')
6262
SET CHLAUTH('*') TYPE(ADDRESSMAP) ADDRESS('*') USERSRC(NOACCESS) DESCR('BackStop rule')
6363
SET CHLAUTH(PASSWORD.SVRCONN) TYPE(ADDRESSMAP) ADDRESS('*') USERSRC(CHANNEL) CHCKCLNT(REQUIRED)
6464
ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) ADOPTCTX(YES)
6565
REFRESH SECURITY TYPE(CONNAUTH)
66-
~~~
66+
```
6767

6868
## Running MQ commands
6969
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:
7070

71-
~~~
71+
```
7272
sudo docker exec \
7373
--tty \
7474
--interactive \
7575
${CONTAINER_ID} \
7676
dspmq
77-
~~~
77+
```
7878

7979
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.
8080

@@ -88,9 +88,9 @@ This image includes the core MQ server, Java, language packs, and GSKit. Other
8888
## Container command not found or does not exist
8989
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:
9090

91-
~~~
91+
```
9292
git config --global core.autocrlf input
93-
~~~
93+
```
9494

9595
## `mqconfig` fails
9696
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

Comments
 (0)