This repository has been archived by the owner on May 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
/
Dockerfile
78 lines (68 loc) · 2.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# © Copyright IBM Corporation 2015, 2016
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM ubuntu:14.04
MAINTAINER Arthur Barr <arthur.barr@uk.ibm.com>
# The URL to download the MQ installer from in tar.gz format
ARG MQ_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/mqadv_dev90_linux_x86-64.tar.gz
# The MQ packages to install
ARG MQ_PACKAGES="MQSeriesRuntime-*.rpm MQSeriesServer-*.rpm MQSeriesMsg*.rpm MQSeriesJava*.rpm MQSeriesJRE*.rpm MQSeriesGSKit*.rpm"
RUN export DEBIAN_FRONTEND=noninteractive \
# Optional: Update the command prompt
&& echo "mq:9.0" > /etc/debian_chroot \
# Install additional packages required by MQ, this install process and the runtime scripts
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
bash \
bc \
coreutils \
curl \
debianutils \
findutils \
gawk \
grep \
libc-bin \
mount \
passwd \
procps \
rpm \
sed \
tar \
util-linux \
# Download and extract the MQ installation files
&& mkdir -p /tmp/mq \
&& cd /tmp/mq \
&& curl -LO $MQ_URL \
&& tar -zxvf ./*.tar.gz \
# Recommended: Create the mqm user ID with a fixed UID and group, so that the file permissions work between different images
&& groupadd --gid 1000 mqm \
&& useradd --uid 1000 --gid mqm --home-dir /var/mqm mqm \
&& usermod -G mqm root \
&& cd /tmp/mq/MQServer \
# Accept the MQ license
&& ./mqlicense.sh -text_only -accept \
# Install MQ using the RPM packages
&& rpm -ivh --force-debian $MQ_PACKAGES \
# Recommended: Set the default MQ installation (makes the MQ commands available on the PATH)
&& /opt/mqm/bin/setmqinst -p /opt/mqm -i \
# Clean up all the downloaded files
&& rm -rf /tmp/mq \
&& rm -rf /var/lib/apt/lists/*
COPY *.sh /usr/local/bin/
COPY *.mqsc /etc/mqm/
RUN chmod +x /usr/local/bin/*.sh
# Always use port 1414 (the Docker administrator can re-map ports at runtime)
EXPOSE 1414
# Always put the MQ data directory in a Docker volume
VOLUME /var/mqm
ENTRYPOINT ["mq.sh"]