Installing Hexaly in Docker: The Complete Hexaly Docker Guide
Deploying Hexaly in Docker is one of the most efficient ways to standardize your optimization environment, streamline automation, and ensure reproducibility across teams. Although Hexaly provides a convenient Linux installer in the form of a .run binary, using it inside a Docker image requires a few best practices.
This guide walks you through installing Hexaly on a Linux-based Docker container using the official .run installer. We’ll use a non-interactive installation for seamless automation. By the end, you’ll have a Docker image ready to solve your toughest optimization challenges.
Why Use Hexaly in Docker?
Running Hexaly inside Docker allows you to:
- Create reproducible optimization environments
- Automate deployments across machines or CI/CD platforms
- Avoid system-specific discrepancies
- Distribute ready-to-run Hexaly containers to your team
Whether you’re building optimization services, experimenting with models, or deploying to the cloud, a Docker image keeps everything consistent.
Requirements
Before proceeding, ensure you have:
- Docker installed on your host machine
- Your Hexaly license file:
license.dat
Example Dockerfile to Install Hexaly
Below is a minimal, production-ready Dockerfile demonstrating how to install Hexaly. The Dockerfile will:
- Download a specific Hexaly version from our website
- Execute the installer using the
--nointeractiveoption - Copy the license file
This template is ideal if you want a clean base for your image.
FROM ubuntu:22.04
# Install system dependencies
RUN apt-get update && \
apt-get install -y wget
ARG HX_MAJOR_VERSION=14_0
ARG HX_RELEASE_DATE=20251029
ARG HX_VERSION=${HX_MAJOR_VERSION}_${HX_RELEASE_DATE}
RUN wget -v https://www.hexaly.com/downloads/${HX_VERSION}/Hexaly_${HX_VERSION}_Linux64.run
# Make the installer executable
RUN chmod +x ./Hexaly_${HX_VERSION}_Linux64.run
# Install Hexaly in silent mode
RUN ./Hexaly_${HX_VERSION}_Linux64.run --nointeractive
COPY license.dat /opt/hexaly_${HX_MAJOR_VERSION}/license.dat
WORKDIR /workspace
CMD ["bash"]
Building the image
Place your Dockerfile and your license.dat file in the same directory, then build your Hexaly Docker image:
docker build -t hexaly:latest
Once the build is complete, you’ll have a ready-to-use containerized Hexaly environment.
Running Hexaly inside a Container
Start a container based on your freshly built image:
docker run -it hexaly:latest
You now have an isolated, reproducible Hexaly Docker setup ready for development, testing, or deployment.
# hexaly /opt/hexaly_14_0/examples/toy/toy.hxm
Hexaly Optimizer 14.0.20251029-Linux64. All rights reserved.
Load /opt/hexaly_14_0/examples/toy/toy.hxm...
Run model...
Run param...
Run optimizer...
Model: expressions = 38, decisions = 8, constraints = 1, objectives = 1
Param: time limit = 10 sec, no iteration limit
[objective direction ]: maximize
[ 0 sec, 0 itr]: 0
[ optimality gap ]: 100.00%
[ 0 sec, 22839 itr]: 280
[ optimality gap ]: 0%
22839 iterations performed in 0 seconds
Optimal solution:
obj = 280
gap = 0%
bounds = 280
Conclusion
Setting up Hexaly in Docker is a powerful way to standardize environments, accelerate automation, and deploy optimization tools with reliability. With the Dockerfile above, you can quickly build a portable Hexaly Docker image, making your workflows more efficient and consistent.