docker - 在我的 docker 上运行 ActiveMQ Artemis,特别是在 mac M1 上

标签 docker docker-compose activemq-artemis

我正在尝试在我的 docker 上运行 ActiveMQ Artemis,但在尝试让它运行时我收到了很多错误。我不确定这是否与我的 yml 文件有关。

这是我正在使用的命令: docker-compose up

这是我的 yml 文件:

version: '2'

services:

  artemis:
    image: quay.io/artemiscloud/activemq-artemis-broker
    ports:
      - "8161:8161"
      - "61616:61616"
      - "5672:5672"
    environment:
       ARTEMIS_USERNAME: "admin"
       ARTEMIS_PASSWORD: "admin"
    networks:
      - amqp-quickstart-network
networks:
  amqp-quickstart-network:

我收到此错误,但不确定如何解决此问题。

Attaching to infrastructure-artemis-1
infrastructure-artemis-1  | Creating Broker with args --role admin --name broker --allow-anonymous --http-host 172.19.0.2 --host 172.19.0.2  --force
infrastructure-artemis-1  | Cannot initialize queue:Function not implemented
infrastructure-artemis-1  |
infrastructure-artemis-1  | usage: artemis <command> [<args>]
infrastructure-artemis-1  |
infrastructure-artemis-1  | The most commonly used artemis commands are:
infrastructure-artemis-1  |     address    Address tools group (create|delete|update|show) (example ./artemis address create)
infrastructure-artemis-1  |     browser    It will browse messages on an instance
infrastructure-artemis-1  |     check      Check tools group (node|queue) (example ./artemis check node)
infrastructure-artemis-1  |     consumer   It will consume messages from an instance
infrastructure-artemis-1  |     create     creates a new broker instance
infrastructure-artemis-1  |     data       data tools group (print|recover) (example ./artemis data print)
infrastructure-artemis-1  |     help       Display help information
infrastructure-artemis-1  |     mask       mask a password and print it out
infrastructure-artemis-1  |     perf       Perf tools group (example ./artemis perf client)
infrastructure-artemis-1  |     producer   It will send messages to an instance
infrastructure-artemis-1  |     queue      Queue tools group (create|delete|update|stat|purge) (example ./artemis queue create)
infrastructure-artemis-1  |     transfer   Moves Messages from one destination towards another destination
infrastructure-artemis-1  |     version    print version information
infrastructure-artemis-1  |
infrastructure-artemis-1  | See 'artemis help <command>' for more information on a specific command.
infrastructure-artemis-1  |
infrastructure-artemis-1  | Running Broker
infrastructure-artemis-1  | /opt/amq/bin/launch.sh: line 47: /home/jboss/broker/bin/artemis: No such file or directory
infrastructure-artemis-1 exited with code 127

最佳答案

你的 docker-compose 文件有问题(检查网络)。我可以用简单的一个衬垫运行它

docker run -e AMQ_USER=admin -e AMQ_PASSWORD=admin -p8161:8161 --name artemis quay.io/artemiscloud/activemq-artemis-broker

docker inspect 显示(网络)

"NetworkSettings": {
    "Bridge": "",
    "SandboxID": "fdd6c31e6e984369e592b968c7eaa465ee67233dd8d8d3d048c9fc99898089f5",
    "HairpinMode": false,
    "LinkLocalIPv6Address": "",
    "LinkLocalIPv6PrefixLen": 0,
    "Ports": {
        "8080/tcp": null,
        "8161/tcp": [
            {
                "HostIp": "0.0.0.0",
                "HostPort": "8161"
            },
            {
                "HostIp": "::",
                "HostPort": "8161"
            }
        ],
        "8443/tcp": null
    },

顺便说一句,我在 Ubuntu 上。

关于docker - 在我的 docker 上运行 ActiveMQ Artemis,特别是在 mac M1 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73447886/

相关文章:

docker - Docker-compose容器:如何为端口别名?

docker-compose 卷未安装

docker - 无法使用 GCP 容器注册表中的镜像启动 Docker 容器

java - 如何在 WildFly 上升级 Artemis

docker - 静态网站的docker

linux - 从官方 jboss/wildfly 图像创建自定义图像时,standalone-full.xml 出现“权限被拒绝”错误

java - 消息监听器不起作用?

java - 使用 Wildlfy 11 嵌入的 Apache Artemis 接收 MQTT 消息

linux - 为什么在 docker 中拉取图像时会出现此错误

docker - 无法在 COPY 指令中使用 ARG 构建 Docker 多阶段镜像