Docker-compose 进行Doris自动化编排部署

WSL 使用Docker-compose 进行Doris自动化编排部署

在 wsl 使用 docker-compose 命令时,提示如下

The command 'docker-compose' could not be found in this WSL 1 distro.
We recommend to convert this distro to WSL 2 and activate
the WSL integration in Docker Desktop settings.

See https://docs.docker.com/desktop/windows/wsl/ for details.

升级发行版本

下载链接

image-20220623113028873

安装完成之后

PowerShell中执行 wsl --set-default-version 2

image-20220623113226248

启用Docker Desktop

image-20220623121737291

image-20220623122203807

下载docker-compose.yml

wget  http://doris.freeoneplus.com/doris/docker-compose/x86_64/1.1.0/perview2/docker-compose.yml

然后同目录下执行
docker-compose up
等执行完当前脚本以后,直接关闭当前命令窗口即可
version: '3'
services:
  docker-fe:
    image: "freeoneplus/apache-doris:1.1.0-perview2-fe"
    container_name: "doris-fe"
    tty: true
    hostname: "fe"
    restart: always
    ports:
      - 8030:8030
      - 9030:9030
    networks:
      doris_net:
        ipv4_address: 172.20.80.2
  docker-be:
    image: "freeoneplus/apache-doris:1.1.0-perview2-be"
    container_name: "doris-be"
    tty: true
    hostname: "fe"
    restart: always
    ports:
      - 8040:8040
      - 9000:9000
      - 9050:9050
    networks:
      doris_net:
        ipv4_address: 172.20.80.3
  register:
    image: "freeoneplus/apache-doris:register"
    container_name: "doris-register"
    hostname: "register"
    privileged: true
    command: ["sh","-c","/root/register.sh"]
    depends_on:
      - docker-fe
      - docker-be
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      doris_net:
        ipv4_address: 172.20.80.4
networks:
  doris_net:
    ipam:
      config:
      - subnet: 172.20.80.0/16

image-20220623132345879

执行之后直接关闭界面 不要 ctrl+c

查看容器

image-20220623132456417

访问界面

http://localhost:8030/login 用户root 不需要密码

image-20220623135017941

命令行>mysql -h localhost -P9030 -uroot

C:\Users\Lenovo>mysql -h localhost -P9030 -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.37 Doris version 1.1.0-preview2-Unknown

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

碰到的问题

官方的是在 powershell 执行命令切换之后没有生效

wsl --set-default-version 2

image-20220623113538313

解决办法

  • 管理员中输入
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

image-20220623113915318

输入更新的命令

wsl.exe --set-version Ubuntu 2

image-20220623121110035

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值