Using Docker

This document will guide you build standalone MatrixOne using Docker.

Step 1: Download and install Docker

  1. Click Get Docker, enter into the Docker’s official document page, depending on your operating system, download and install the corresponding Docker. It is recommended to choose Docker version 20.10.18 or later and strive to maintain consistency between the Docker client and Docker server versions.

  2. After the installation, you can verify the Docker version by using the following lines:

    1. docker --version

    The successful installation results are as follows:

    1. Docker version 20.10.18, build 100c701
  3. Execute the following command in your terminal, start Docker and check whether the running status is successfully:

    1. systemctl start docker
    2. systemctl status docker

    The following code example indicates that Docker is running. Active: active (running) shows that Docker is running.

    1. docker.service - Docker Application Container Engine
    2. Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
    3. Active: active (running) since Sat 2022-11-26 17:48:32 CST; 6s ago
    4. Docs: https://docs.docker.com
    5. Main PID: 234496 (dockerd)
    6. Tasks: 8
    7. Memory: 23.6M

Step 2: Create and run the container of MatrixOne

It will pull the image from Docker Hub if not exists. You can choose to pull the stable version image or the develop version image.

Stable Version Image(1.1.0 version)Develop Version Image

  1. docker pull matrixorigin/matrixone:1.1.0
  2. docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:1.1.0

If you are using the network in mainland China, you can pull the MatrixOne stable version image on Alibaba Cloud:

  1. docker pull registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.1.0
  2. docker run -d -p 6001:6001 --name matrixone registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.1.0

If you want to pull the develop version image, see Docker Hub, get the image tag. An example as below:

  1. docker pull matrixorigin/matrixone:nightly-commitnumber
  2. docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:nightly-commitnumber

If you are using the network in mainland China, you can pull the MatrixOne develop version image on Alibaba Cloud:

  1. docker pull registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:nightly-commitnumber
  2. docker run -d -p 6001:6001 --name matrixone registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:nightly-commitnumber

Note: The nightly version is updated once a day.

Note

If your Docker version is lower than 20.10.18 or the Docker client and server versions are inconsistent, upgrading to the latest stable version before attempting is recommended. If you choose to proceed with the current versions, you need to add the parameter --privileged=true to the docker run command, as shown below:

  1. docker run -d -p 6001:6001 --name matrixone --privileged=true matrixorigin/matrixone:1.1.0

Note

The initial startup of MatrixOne approximately takes 20 to 30 seconds. After a brief wait, you can connect to MatrixOne using the MySQL client.

If you need to mount data directories or customize configure files, see Mount the directory to Docker container.

Step 3: Connect to standalone MatrixOne

Install and configure MySQL Client

The Debian11.1 version does not have MySQL Client installed by default, so it needs to be downloaded and installed manually.

  1. Execute the following commands in sequence:

    1. wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
    2. sudo dpkg -i ./mysql-apt-config_0.8.22-1_all.deb
    3. sudo apt update
    4. sudo apt install mysql-client
  2. Execute the command mysql --version to test whether MySQL is available. The result of the successful installation is as follows:

    1. mysql --version
    2. mysql Ver 8.0.33 for Linux on x86_64 (MySQL Community Server - GPL)

Tips: Currently, MatrixOne is only compatible with the Oracle MySQL client. This means some features might not work with the MariaDB or Percona clients.

Connect to MatrixOne

You can use the MySQL command-line client to connect to MatrixOne server. Open a new terminal window and enter the following command:

  1. ```
  2. mysql -h 127.0.0.1 -P 6001 -uroot -p
  3. Enter password: # The default initial password is 111
  4. ```

Currently, MatrixOne only supports the TCP listener.

Info

The login account in the above code snippet is the initial account; please change the initial password after logging in to MatrixOne; see Password Management.