Using Docker
Many of our demos rely on Docker and Docker Compose to make it easy to deploy Materialize, along with any other infrastructure the demo needs.
For the best experience using Docker, we recommend following the guidelines outlined here.
Installation
Follow the official instructions to install Docker and Docker Compose:
Increase Docker Resources
Because many of our Docker-based demos leverage a large number of pieces of infrastructure, we recommend running Docker with at least 2 CPUs and 8 GB of memory.
On macOS:
-
Open Docker for Mac‘s Preferences window.
-
Click Resources.
-
Click Advanced.
-
Move the CPUs slider to at least 2.
-
Move the Memory slider to at least 8.00 GB.
-
Click Apply & Restart.
Note that on Linux, Docker automatically shares memory with the host machines; as long as your host machine has more than 8 GB of memory, you shouldn’t run into issues.
Use the mzcompose
wrapper script
Materialize’s Docker Compose configurations do not work directly with the
docker-compose
command, but require a thin wrapper called mzcompose
.
You will need Python 3.5+ to run
mzcompose
. This is installed by default on recent versions of macOS and most
Linux distributions.
The mzcompose
wrapper accepts all the same arguments and options as
docker-compose
. Use it just as you would docker-compose
:
$ cd demo/http_logs
$ ./mzcompose up -d # replaces `docker-compose up -d`