docker 部署失败

docker-compose 部署 5.2.0 版 5.1.6 版 5.0.26 版,都失败
smc-emqx:
image: emqx/emqx:5.2.0
hostname: “smc-emqx”
ports:
- 1883:1883
- 8083:8083
- 8084:8084
- 8883:8883
- 18083:18083
volumes:
- ./emqx/data:/opt/emqx/data
- ./emqx/lib:/opt/emqx/lib
- ./emqx/log:/opt/emqx/log
privileged: true
restart: always
networks:
- smc_net

==============================================

2023-09-14 18:16:40 ERROR: {“init terminating in do_boot”,{load_failed,[file_server,filename,code_server,error_logger,ets,gen,error_handler,application_controller,erl_parse,application_master,lists,proc_lib,supervisor,logger_simple_h,logger_config,logger_backend,logger_filters,application,logger_server,kernel,logger,heart,gen_event,file_io_server,gen_server,erl_eval,file,erl_lint,code]}}
2023-09-14 18:16:40 init terminating in do_boot ({load_failed,[file_server,filename,code_server,error_logger,ets,gen,error_handler,application_controller,erl_parse,application_master,lists,proc_lib,supervisor,logger_simple_h,logger_config,logger_backend,logger_filters,application,logger_server,kernel,logger,heart,gen_event,file_io_server,gen_server,erl_eval,file,erl_lint,code]})
2023-09-14 18:16:40 ERROR: Please ensure it is running on the correct platform:
2023-09-14 18:16:40 ERROR: arch: “x86_64-pc-linux-gnu”
2023-09-14 18:16:40 wordsize: 64
2023-09-14 18:16:40 os: “debian11”
2023-09-14 18:16:40 erlang: “25.3.2-2”
2023-09-14 18:16:40 elixir: “none”
2023-09-14 18:16:40 relform: “docker”
2023-09-14 18:16:40 ERROR: Version=5.2.0-build.1
2023-09-14 18:16:40 ERROR: Required dependencies: openssl-1.1.1 (libcrypto), libncurses and libatomic1

好像是缺少 openssl,但是这个必须手动去安装吗

这个image是你自己打的么? 因为5.2.0的image都还没有发布。
你的报错是编译的包有问题,不是那个平台的。
我使用官方的5.1.6是可以的。

version: '3'

services:
  emqx1:
    image: emqx:5.1.6
    container_name: emqx1
    environment:
    - "EMQX_NODE_NAME=emqx@node1.emqx.io"
    - "EMQX_CLUSTER__DISCOVERY_STRATEGY=static"
    - "EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.io,emqx@node2.emqx.io]"
    healthcheck:
      test: ["CMD", "/opt/emqx/bin/emqx ctl", "status"]
      interval: 5s
      timeout: 25s
      retries: 5
    networks:
      emqx-bridge:
        aliases:
        - node1.emqx.io
    ports:
      - 1883:1883
      - 8083:8083
      - 8084:8084
      - 8883:8883
      - 18083:18083 
    # volumes:
    #   - $PWD/emqx1_data:/opt/emqx/data

  emqx2:
    image: emqx:5.1.6
    container_name: emqx2
    environment:
    - "EMQX_NODE_NAME=emqx@node2.emqx.io"
    - "EMQX_CLUSTER__DISCOVERY_STRATEGY=static"
    - "EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.io,emqx@node2.emqx.io]"
    healthcheck:
      test: ["CMD", "/opt/emqx/bin/emqx ctl", "status"]
      interval: 5s
      timeout: 25s
      retries: 5
    networks:
      emqx-bridge:
        aliases:
        - node2.emqx.io
    # volumes:
    #   - $PWD/emqx2_data:/opt/emqx/data

networks:
  emqx-bridge:
    driver: bridge

docker ps |grep emqx
e93d88cc65c3   emqx:5.1.6                            "/usr/bin/docker-ent…"   2 minutes ago   Up 2 minutes (unhealthy)   1883/tcp, 4370/tcp, 5369/tcp, 8083-8084/tcp, 8883/tcp, 11883/tcp, 18083/tcp                                                                                                                                                                                    emqx2
b07ebd7a57af   emqx:5.1.6                            "/usr/bin/docker-ent…"   2 minutes ago   Up 2 minutes (unhealthy)   4370/tcp, 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp, 0.0.0.0:8083-8084->8083-8084/tcp, :::8083-8084->8083-8084/tcp, 5369/tcp, 0.0.0.0:8883->8883/tcp, :::8883->8883/tcp, 0.0.0.0:18083->18083/tcp, :::18083->18083/tcp, 11883/tcp    

我看官网好像docker已经可以拉5.2.0的?我拉下来也可以。但是我拉了三个版本的,5.1.6.和5.0.26都有,window11的docker都不能运行。到时报这个错误。因为我们的应用需要离线安装,所以我要拉下来再打一下,但是window11的docker拉下运行一直报错

能把你具体操作的命令分享一下么?


这个不就是官网上已经提示了有5.2.0版本吗,我是先docker pull emqx/emqx:5.2.0 拉下来的,然后再执行上面那个docker-compose 的

已经解决了,我去掉docker-compose 里面的volumes就不会报错了.

额,是的,你居然把lib都给mount出来了,没看仔细…

1 个赞