Add dockerfiles

This commit is contained in:
2024-11-01 00:07:50 +01:00
parent c8d445ed6a
commit 4ce61f349f
15 changed files with 86 additions and 10 deletions

10
rln/ubi9/Dockerfile.ubi9 Normal file
View File

@@ -0,0 +1,10 @@
# docker buildx build -t pymqi . -f Dockerfile.ubi9
FROM registry.access.redhat.com/ubi9/python-312:1-25.1729767846
USER 0
RUN yum update -y \
&& yum install -y tar wget python3 python3-devel python3-pip
ENTRYPOINT ["tail", "-f", "/dev/null"]

View File

@@ -0,0 +1,21 @@
# docker buildx build -t pymqi . -f Dockerfile.ubi9-mqclient
FROM registry.access.redhat.com/ubi9/python-312:1-25.1729767846
USER 0
COPY ./mq/9.4.1.0-IBM-MQC-LinuxX64.tar.gz /tmp/IBM-MQC-LinuxX64.tar.gz
COPY ./mq/*.py /tmp
RUN yum update -y \
&& yum install -y tar wget python3 python3-devel python3-pip \
&& cd /tmp \
&& tar -xvf IBM-MQC-LinuxX64.tar.gz \
&& cd /tmp/MQClient \
&& ./mqlicense.sh -accept \
&& rpm -i *.rpm \
&& /opt/mqm/bin/setmqinst -i -p /opt/mqm \
&& source /opt/mqm/bin/setmqenv -l -p /opt/mqm \
&& pip install pymqi
ENTRYPOINT ["tail", "-f", "/dev/null"]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,13 @@
import pymqi
queue_manager = 'QM1'
queue_name = 'DEV.QUEUE1'
message = 'Hello from Python!'
qmgr = pymqi.connect(queue_manager)
queue = pymqi.Queue(qmgr, queue_name)
queue.put(message)
queue.close()
qmgr.disconnect()

17
rln/ubi9/mq/pymqi-tcp.py Normal file
View File

@@ -0,0 +1,17 @@
import pymqi
queue_manager = 'QM1'
channel = 'DEV.APP.SVRCONN'
host = '192.168.50.155'
port = '1414'
queue_name = 'DEV.QUEUE1'
message = 'Hello from Python!'
conn_info = '%s(%s)' % (host, port)
qmgr = pymqi.connect(queue_manager, channel, conn_info)
queue = pymqi.Queue(qmgr, queue_name)
queue.put(message)
queue.close()
qmgr.disconnect()

7
rln/ubi9/notes.md Normal file
View File

@@ -0,0 +1,7 @@
# Notes
Build ubi9 container with MQ client and pymqi installed.
```bash
docker buildx build -t pymqi . -f Dockerfile.ubi9
docker tag pymqi git.cbo.dk/rasmus/mq-container:ubi9-client
docker push git.cbo.dk/rasmus/mq-container:ubi9-client
```