docker-compose部署sentinel-dashboard-1.8.5

一、创建文件夹

复制代码
mkdir -p /docker/alibaba/sentinel/{config,data,logs}

二、拷贝jar包进sentinel目录下

三、Dockerfile文件

复制代码
FROM openjdk:8-jre
MAINTAINER yh
COPY ./sentinel-dashboard.jar /app.jar
EXPOSE 8718
ENTRYPOINT ["java", "-jar", "app.jar"]

四、docker-compose.yml

bash 复制代码
version: '3.9'
services:
  sentinel:
    build:
      context: ./
      dockerfile: ./Dockerfile
    image: sentinel
    container_name: sentinel
    ports:
      - "8718:8718"
    environment:
      JVM_OPTS: -server -Xmx512M -Xms512M -XX:MaxMetaspaceSize=256M -XX:CompressedClassSpaceSize=50M -XX:ReservedCodeCacheSize=240M -XX:MaxDirectMemorySize=400M
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "1"
    volumes:
      - "/docker/alibaba/sentinel/logs:/root/logs"
      - "/docker/alibaba/sentinel/logs:/app-logs"
    command: [
      "--server.port=8718",
      "--logging.file.path=/app-logs"
    ]
    restart: always
    network_mode: "host"
    

五、启动

bash 复制代码
docker-compose up -d

六、防火墙开放8718端口

bash 复制代码
firewall-cmd --permanent --add-port=8718/tcp
 
# 防火墙重载
firewall-cmd --reload

七、访问验证

http://172.50.2.40:8718/

相关推荐
虎头金猫18 小时前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
分布式存储与RustFS18 小时前
MinIO 官方 Docker 镜像被移除:依赖它的项目该怎么办
docker·云原生·devops·对象存储·minio·分布式存储
玉&心20 小时前
通过Arthas在线诊断K8S中的内存及JVM等使用情况
docker·k8s·arthas
xing-xing21 小时前
Docker容器中Nginx站点根目录网页配置访问
nginx·docker
赵文宇(温玉)21 小时前
CoreDNS的hosts插件的缺行配置导致k8s集群异常
容器·kubernetes·rancher
guo_wen_qiang21 小时前
上传本地镜像到harbor中
docker·容器·持续部署
羑悻的小杀马特21 小时前
Dockerfile 全景指南:从入门编写dockerfile到生产环境镜像优化实战,一步步带你从啃透制作指令到镜像制作落地!
docker·dockerfile·镜像制作
BianHuanShiZhe1 天前
docker常见命令
docker
正经教主1 天前
【FDE系列】阶段2:Day 43:Docker Compose — 多容器一键编排
人工智能·docker·fde
忆~遂愿1 天前
本地片库怎么在外面打开?Plex + cpolar 搭一套可远程访问的私人影音库
docker·容器