docker 在Mac的M1芯片下,有的不成功的解决

version: '3.7'
services:
  prometheus:
    container_name: "prometheus"
    restart: always
    image: prom/prometheus
    deploy:
        resources:
            limits:
              cpus: "0.20"
              memory: 500m
            reservations:
              cpus: "0.25"
              memory: 128M
    networks:
      - monitor-n
    ports:
       - 9090:9090
    volumes:
      - ./prometheus:/etc/prometheus
  clickhouse:
    container_name: "clickhouse"
    image: clickhouse/clickhouse-server:latest@sha256:8f4a41d51a9f326c8e554943b9b868c654b8b7b1c461cc3acbc85dd70f510265
    restart: always
    ulimits:
      nproc: 65535
      nofile:
        soft: 262144
        hard: 262144
    deploy:
        resources:
            limits:
              cpus: "0.50"
              memory: 3000m
            reservations:
              cpus: "0.25"
              memory: 500M
    networks:
      - monitor-n
    ports:
       - "8123:8123"
       - "9363:9363"
       - "4200:4200"
       - "8001:8001"
    volumes:
      - ./clickhouse/config:/etc/clickhouse-server
      - ./clickhouse/data:/var/lib/clickhouse/
      - ./clickhouse/logs:/var/log/clickhouse-server/
  grafana:
    container_name: "grafana"
    restart: always
    image: grafana/grafana-enterprise
    volumes:
      - ./grafana/data:/var/lib/grafana
      - ./grafana/etc:/etc/grafana
      - ./grafana/logs:/var/log/grafana
    deploy:
        resources:
            limits:
              cpus: "0.20"
              memory: 500m
            reservations:
              cpus: "0.25"
              memory: 128M
    networks:
      - monitor-n
    ports:
       - 3000:3000
  alertmanager:
    restart: always
    container_name: altermanager
    image: prom/alertmanager
    volumes:
      - ./alertmanager:/etc/alertmanager
    ports:
      - 9093:9093
    networks:
      - monitor-n
    deploy:
        resources:
            limits:
              cpus: "0.20"
              memory: 500m
            reservations:
              cpus: "0.25"
              memory: 128M
    # command:
    #   - '--path.sysfs /host/sys'
    #   - '--collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)"'
networks:
  monitor-n:
下载对应的镜像源:
docker pull clickhouse/clickhouse-server:latest@sha256:8f4a41d51a9f326c8e554943b9b868c654b8b7b1c461cc3acbc85dd70f510265

查找方式:https://hub.docker.com/r/clickhouse/clickhouse-server/tags

 

 使用对应的:

 

 

posted @ 2023-01-05 18:17  爱家家的卡卡  阅读(665)  评论(0编辑  收藏  举报