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

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"
    

五、启动

docker-compose up -d

六、防火墙开放8718端口

firewall-cmd --permanent --add-port=8718/tcp
 
# 防火墙重载
firewall-cmd --reload

七、访问验证

http://172.50.2.40:8718/

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值