@@ -10,27 +10,37 @@ FROM ubuntu:14.04
10
10
MAINTAINER Arthur Barr <arthur.barr@uk.ibm.com>
11
11
12
12
RUN export DEBIAN_FRONTEND=noninteractive \
13
+ # The URL to download the MQ installer from in tar.gz format
13
14
&& MQ_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/mqadv_dev80_linux_x86-64.tar.gz \
15
+ # The MQ packages to install
14
16
&& MQ_PACKAGES="MQSeriesRuntime-*.rpm MQSeriesServer-*.rpm MQSeriesMsg*.rpm MQSeriesJava*.rpm MQSeriesJRE*.rpm MQSeriesGSKit*.rpm" \
17
+ # Optional: Update the command prompt
15
18
&& echo "mq:8.0" > /etc/debian_chroot \
19
+ # Install additional packages required by this install process and the runtime scripts
16
20
&& apt-get update -y \
17
21
&& apt-get install -y \
18
22
bash \
19
23
bc \
20
24
curl \
21
25
rpm \
22
26
tar \
27
+ # Download and extract the MQ installation files
23
28
&& mkdir -p /tmp/mq \
24
29
&& cd /tmp/mq \
25
30
&& curl -LO $MQ_URL \
26
31
&& tar -zxvf ./*.tar.gz \
27
- && groupadd --gid 1414 mqm \
28
- && useradd --uid 1414 --gid mqm --home-dir /var/mqm mqm \
32
+ # Recommended: Create the mqm user ID with a fixed UID and group, so that the file permissions work between different images
33
+ && groupadd --gid 1000 mqm \
34
+ && useradd --uid 1000 --gid mqm --home-dir /var/mqm mqm \
29
35
&& usermod -G mqm root \
30
36
&& cd /tmp/mq/MQServer \
37
+ # Accept the MQ license
31
38
&& ./mqlicense.sh -text_only -accept \
39
+ # Install MQ using the RPM packages
32
40
&& rpm -ivh --force-debian $MQ_PACKAGES \
41
+ # Recommended: Set the default MQ installation (makes the MQ commands available on the PATH)
33
42
&& /opt/mqm/bin/setmqinst -p /opt/mqm -i \
43
+ # Clean up all the downloaded files
34
44
&& rm -rf /tmp/mq \
35
45
# Bypass defect in the "mqconfig" script
36
46
&& sed -i -e "s;CheckShellDefaultOptions$;#CheckShellDefaultOptions;g" /opt/mqm/bin/mqconfig
@@ -43,8 +53,10 @@ ENV MQ_QMGR_CMDLEVEL=802
43
53
44
54
RUN chmod +x /usr/local/bin/*.sh
45
55
56
+ # Always use port 1414 (the Docker administrator can re-map ports at runtime)
46
57
EXPOSE 1414
47
58
59
+ # Always put the MQ data directory is in a Docker volume
48
60
VOLUME /var/mqm
49
61
50
62
ENTRYPOINT ["mq.sh" ]
0 commit comments