Skip to content

Commit 7a7f774

Browse files
Build docker image with queue manager started
1 parent b3d3a5e commit 7a7f774

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

deps/amqp10_client/ibm-mq/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN wget -c https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messa
1313

1414
WORKDIR /var/MQServer
1515

16-
RUN bin/mqlicense -accept
16+
RUN bin/mqlicense -accept
1717

1818
RUN echo "Checking MQ version" \
1919
&& bin/dspmqver
@@ -22,9 +22,13 @@ RUN groupadd mqm
2222
RUN useradd -g mqm app
2323
RUN /bin/bash -c "source /var/MQServer/bin/setmqenv -s" \
2424
&& bin/crtmqm QM1 \
25-
&& echo "Created Queue Manager ( $? )" \
26-
&& bin/strmqm QM1 \
27-
&& echo "Started Queue Manager ( $? )"
25+
&& echo "Created Queue Manager ( $? )"
26+
27+
COPY start.sh /var/MQServer/start.sh
28+
RUN chmod 777 /var/MQServer/start.sh
29+
EXPOSE 1414/tcp
30+
#ENV MQ_OVERRIDE_DATA_PATH=/mnt/mqm/data MQ_OVERRIDE_INSTALLATION_NAME=Installation1 MQ_USER_NAME="mqm"
31+
ENTRYPOINT /var/MQServer/start.sh
2832

2933
#RUN wget https://raw.githubusercontent.com/ibm-messaging/mq-dev-samples/master/gettingStarted/mqsc/mq-dev-config.mqsc
3034

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Build docker image
2+
3+
docker build -t "ibm-mq" --build-arg ARCH=ARM64 .
4+
5+
# Run docker image
6+
7+
docker run -d ibm-mq
8+
9+
# Display queues
10+
11+
docker exec -it ibm-mq
12+
13+
display queue(*)
14+
15+

deps/amqp10_client/ibm-mq/start.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
# Note: I've written this using sh so it works in the busybox container too
3+
4+
# USE the trap if you need to also do manual cleanup after the service is stopped,
5+
# or need to start multiple services in the one container
6+
7+
# start service in background here
8+
/var/MQServer/bin/strmqm QM1
9+
/var/MQServer/bin/dspmq -m QM1
10+
tail -f /dev/null

0 commit comments

Comments
 (0)