1、Docker安装
参考:https://www.cnblogs.com/a120608yby/p/9883175.html
2、Docker Compose安装
参考:https://www.cnblogs.com/a120608yby/p/14582853.html
3、服务配置
# vim docker-compose.yml version: '3.8' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.4.2 container_name: elasticsearch restart: always ports: - "9200:9200" networks: - ops_default healthcheck: test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1" ] interval: 30s timeout: 10s retries: 3 start_period: 10s environment: - discovery.type=single-node - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m" ulimits: memlock: soft: -1 hard: -1 volumes: - ./data:/usr/share/elasticsearch/data - /etc/localtime:/etc/localtime:ro oap: image: apache/skywalking-oap-server:latest container_name: oap restart: always depends_on: elasticsearch: condition: service_healthy links: - elasticsearch ports: - "11800:11800" - "12800:12800" networks: - ops_default healthcheck: test: [ "CMD-SHELL", "/skywalking/bin/swctl ch" ] interval: 30s timeout: 10s retries: 3 start_period: 10s environment: SW_STORAGE: elasticsearch SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200 SW_HEALTH_CHECKER: default SW_TELEMETRY: prometheus JAVA_OPTS: "-Xms2048m -Xmx2048m" volumes: - /etc/localtime:/etc/localtime:ro ui: image: apache/skywalking-ui:latest container_name: ui restart: always depends_on: oap: condition: service_healthy links: - oap ports: - "8080:8080" networks: - ops_default environment: SW_OAP_ADDRESS: http://oap:12800 volumes: - /etc/localtime:/etc/localtime:ro networks: ops_default: external: true
4、启动服务
docker-compose up -d
5、查看服务启动状态
docker-compose ps
参考:
https://github.com/apache/skywalking/tree/master/docker