Important: ZeroMQ is a messaging library, not a message broker or server. It is embedded directly into applications and does not run as a standalone service. This guide provides a Docker-based development environment for building ZeroMQ applications.
For Docker installation, see Docker.
Create a directory for your ZeroMQ development environment.
mkdir -p /opt/zeromq-dev
cd /opt/zeromq-dev
Define a development container with ZeroMQ libraries installed.
Note: There is no official ZeroMQ Docker image for running as a service. This image is for development purposes.
services:
zeromq-dev:
image: ubuntu:22.04
container_name: zeromq-dev
volumes:
- ./src:/workspace/src
working_dir: /workspace
command: tail -f /dev/null
# Install ZeroMQ development libraries
# Run: docker exec -it zeromq-dev apt update && apt install -y libzmq3-dev
docker compose up -d
# Enter the container
docker exec -it zeromq-dev bash
# Install ZeroMQ development libraries
apt update
apt install -y libzmq3-dev
# Verify installation
pkg-config --modversion libzmq
Place your source code in the ./src directory and compile against ZeroMQ:
# Example: Compile a C++ application
g++ -o myapp src/myapp.cpp -lzmq
# Example: Python applications
pip install pyzmq
Any questions?
Feel free to contact us. Find all contact information on our contact page.