首页 文章

如何使用wildfly swarm docker启用管理控制台?

提问于
浏览
1

我想为服务器wildfly swarm docker主动控制台管理

我有pom的家属

<dependency>
    <groupId>org.wildfly.swarm</groupId>
    <artifactId>management-console</artifactId>
    <version>2017.1.1</version>
</dependency>
<dependency>
    <groupId>org.wildfly.swarm</groupId>
    <artifactId>management</artifactId>
    <version>2017.1.1</version>
    <type>jar</type>
</dependency>

我有日志管理 - STABLE,但WFLYSRV0054:管理控制台未启用 .

我尝试通过项目阶段文件启用控制台,我添加:

swarm:
  management:
    security-realms:
      ManagementRealm:
        in-memory-authentication:
          users:
            admin:    
              password: admin                            
    http-interface-management-interface:
      allowed-origins:
      - http://localhost:8080
      security-realm: ManagementRealm

但没有奏效 . 有人能帮帮我吗?

1 回答

  • 2

    我在docker镜像中添加了admin用户 . 这样,您将在服务的所有任务(容器)中拥有相同的用户 .

    Dockerfile的一个例子:

    FROM jboss/wildfly:latest
    # create user
    RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#123 --silent
    # enable management console
    CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
    

相关问题