官方文档:https://manual.manticoresearch.com/Installation/Docker
1、拉取镜像:
docker pull manticoresearch/manticore
2、需要提前创建挂载
挂载文件: /data/manticore/manticore.conf
挂载目录:/data/manticore/data
3、运行并设置挂载:
docker run --name manticore -v /data/manticore/manticore.conf:/etc/manticoresearch/manticore.conf -v /data/manticore/data:/var/lib/manticore/ -d --restart=always -p 9306:9306 -p 9308:9308 -d manticoresearch/manticore:latest
4.查看日志:
docker logs -f manticore
5.出现这个代表启动成功:
问题解决:
1.拉去镜像时会出现超时,镜像源不可用,需要科学上网。
2.linux服务器搭建时无法拉取镜像,我使用本地Mac电脑拉取镜像并打包上传至服务器
3.mac电脑拉取的镜像和linux上的会有不兼容的问题,需要在拉取镜像时设置运行架构。
具体步骤:
拉取指定架构版本镜像:
docker pull --platform linux/amd64 manticoresearch/manticore:latest
打包镜像:
docker save -o manticoresearch/manticore3.tar 63681c244480
打包好的镜像上传到服务器
在服务器上将打包好的镜像load成镜像
文件存放的地址:/data/tools/
docker load < /data/tools/manticore3.tar
重新命名
docker tag 116da4a3b47b manticoresearch/manticore:latest
运行镜像
docker run --name manticore -v /data/manticore/manticore.conf:/etc/manticoresearch/manticore.conf -v /data/manticore/data:/var/lib/manticore/ -d --restart=always -p 9306:9306 -p 9308:9308 -d manticoresearch/manticore:latest
我准备了两个版本的文件:
mac版本:
https://download.youkuaiyun.com/download/qq_45000856/90526076
Linux版本:
https://download.youkuaiyun.com/download/qq_45000856/90526087