Public | Automated Build

Last pushed: 2 years ago
Short Description
Docker images providing ZeroMQ bindings
Full Description

Supported tags and Dockerfiles

Images hosted on lucsorel/zeromq-bindings Docker hub :

Images with ZeroMQ installation and bindings

With bindings for Python applications

This image compiles the Python bindings from the official py-zmq projects and removes the packages involved in the compilation for image-size sake: .

A typical Dockerfile for a ZeroMQ-Python application would look like:

FROM lucsorel/zeromq-bindings:alpinelinux3.3-zeromq4.3.x-pyzmq15.2.0

# installs the Python application
RUN mkdir -p /usr/local/my-python-zeromq-app
WORKDIR /usr/local/my-python-zeromq-app
COPY preprocess.py /usr/local/my-python-zeromq-app/

# exposes tcp ports used by ZeroMQ sockets
EXPOSE 6969

# starts the application
CMD [ "python", "my-python-zeromq-app.py" ]

With bindings for a scikit-learn application

This image compiles the Python bindings from the official py-zmq projects and removes the packages involved in the compilation for image-size sake: .

A typical Dockerfile for a ZeroMQ/scikit-learn application would look like:

FROM lucsorel/zeromq-bindings:ubuntu15.10-zeromq4.1.x-scikit-learn0.17.x

# installs the scikit-learn Python script
RUN mkdir -p /usr/local/data-mining
WORKDIR /usr/local/data-mining
COPY stream_analysis.py /usr/local/data-mining/

# exposes the tcp port used by the ZeroMQ socket
EXPOSE 6969

# starts the application
CMD [ "python", "stream_analysis.py" ]

With bindings for NodeJS applications

ZeroMQ bindings for NodeJS require npm and Python 2.x to be installed when your container runs the npm i command, which installs zmq via the node-gyp binding system. This is why these images are bigger than 'classic' NodeJS or ZeroMQ images.

A typical Dockerfile for a ZeroMQ-NodeJS application would look like:

# for an Alpine Linux-based image:
FROM lucsorel/zeromq-bindings:alpinelinux3.3-zeromq4.3.x-nodejs4.3.x
# or for an Ubuntu-based image:
# FROM lucsorel/zeromq-bindings:ubuntu15.10-zeromq4.0-nodejs4.3.0

# installs the NodeJS application and dependencies (including zmq - https://github.com/JustinTulloss/zeromq.node):
RUN mkdir -p /usr/local/my-nodejs-zeromq-app
WORKDIR /usr/local/my-nodejs-zeromq-app
COPY package.json server.js /usr/local/my-nodejs-zeromq-app/
RUN npm install
# copy static content folders
COPY www /usr/local/my-nodejs-zeromq-app/webapp/www

# exposes http and tcp ports used by ZeroMQ sockets
EXPOSE 3000
EXPOSE 6969

# starts the application
CMD [ "npm", "start" ]
Docker Pull Command
Owner
lucsorel
Source Repository

Comments (0)