docker.recipes

Apache SkyWalking

intermediate

Application performance monitoring and observability for distributed systems.

Overview

Apache SkyWalking OAP (Observability Analysis Platform) is the core backend component of the Apache SkyWalking APM system, designed to collect, analyze, and store observability data from distributed applications. Originally developed by Huawei and donated to the Apache Foundation in 2017, SkyWalking provides comprehensive application performance monitoring through distributed tracing, metrics collection, and topology analysis. The OAP server processes telemetry data from various language agents and presents it through advanced analytics and alerting capabilities. This stack combines the SkyWalking OAP server with Elasticsearch for scalable data storage and the SkyWalking UI for visualization. Elasticsearch handles the high-volume ingestion of trace data, metrics, and logs, while the OAP server performs real-time analysis including service topology discovery, performance metric calculation, and alarm detection. The UI component provides interactive dashboards for exploring service maps, analyzing trace details, and monitoring application health across your entire distributed system. Development teams managing microservices architectures, DevOps engineers implementing observability strategies, and operations teams troubleshooting performance issues will find this stack invaluable. Unlike simple logging solutions, SkyWalking provides automatic service dependency mapping, code-level performance insights, and correlation between infrastructure metrics and application behavior, making it particularly powerful for Java-heavy environments and complex distributed systems.

Key Features

  • Automatic service topology discovery and visualization without manual configuration
  • Distributed tracing with context propagation across microservices boundaries
  • Real-time performance metrics aggregation and statistical analysis
  • Code-level profiling with method-level performance breakdown
  • Multi-dimensional alarm system with customizable threshold rules
  • Support for multiple programming languages through native agents
  • Service mesh observability with Istio and Envoy integration
  • Database performance monitoring with slow query detection

Common Use Cases

  • 1Microservices performance monitoring in Spring Boot and Spring Cloud applications
  • 2Root cause analysis for latency spikes in distributed e-commerce platforms
  • 3Service dependency mapping during legacy system modernization projects
  • 4API gateway performance optimization and bottleneck identification
  • 5Database query performance analysis in multi-tenant SaaS applications
  • 6Cross-team collaboration on service reliability in enterprise environments
  • 7Compliance monitoring for SLA adherence in financial services applications

Prerequisites

  • Minimum 4GB RAM available (2GB for Elasticsearch, 1GB for OAP server)
  • Ports 8080, 11800, and 12800 available on the host system
  • Understanding of distributed tracing concepts and APM terminology
  • Knowledge of your application's technology stack for agent installation
  • Basic familiarity with Elasticsearch concepts for advanced configuration
  • Access to application source code or deployment pipeline for agent integration

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 elasticsearch:
3 image: elasticsearch:7.17.9
4 container_name: skywalking-es
5 environment:
6 discovery.type: single-node
7 ES_JAVA_OPTS: "-Xms512m -Xmx512m"
8 volumes:
9 - es_data:/usr/share/elasticsearch/data
10 networks:
11 - skywalking-network
12
13 skywalking-oap:
14 image: apache/skywalking-oap-server:latest
15 container_name: skywalking-oap
16 restart: unless-stopped
17 environment:
18 SW_STORAGE: elasticsearch
19 SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
20 ports:
21 - "11800:11800"
22 - "12800:12800"
23 depends_on:
24 - elasticsearch
25 networks:
26 - skywalking-network
27
28 skywalking-ui:
29 image: apache/skywalking-ui:latest
30 container_name: skywalking-ui
31 restart: unless-stopped
32 environment:
33 SW_OAP_ADDRESS: http://skywalking-oap:12800
34 ports:
35 - "8080:8080"
36 depends_on:
37 - skywalking-oap
38 networks:
39 - skywalking-network
40
41volumes:
42 es_data:
43
44networks:
45 skywalking-network:
46 driver: bridge

.env Template

.env
1# SkyWalking configuration

Usage Notes

  1. 1Docs: https://skywalking.apache.org/docs/
  2. 2Dashboard at http://localhost:8080 - topology, traces, metrics
  3. 3Agent gRPC endpoint on port 11800 for language agents
  4. 4REST API on port 12800 for queries and integrations
  5. 5Install Java agent: -javaagent:skywalking-agent.jar
  6. 6Agents available for Java, .NET, Node.js, Python, Go, and more

Individual Services(3 services)

Copy individual services to mix and match with your existing compose files.

elasticsearch
elasticsearch:
  image: elasticsearch:7.17.9
  container_name: skywalking-es
  environment:
    discovery.type: single-node
    ES_JAVA_OPTS: "-Xms512m -Xmx512m"
  volumes:
    - es_data:/usr/share/elasticsearch/data
  networks:
    - skywalking-network
skywalking-oap
skywalking-oap:
  image: apache/skywalking-oap-server:latest
  container_name: skywalking-oap
  restart: unless-stopped
  environment:
    SW_STORAGE: elasticsearch
    SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
  ports:
    - "11800:11800"
    - "12800:12800"
  depends_on:
    - elasticsearch
  networks:
    - skywalking-network
skywalking-ui
skywalking-ui:
  image: apache/skywalking-ui:latest
  container_name: skywalking-ui
  restart: unless-stopped
  environment:
    SW_OAP_ADDRESS: http://skywalking-oap:12800
  ports:
    - "8080:8080"
  depends_on:
    - skywalking-oap
  networks:
    - skywalking-network

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 elasticsearch:
5 image: elasticsearch:7.17.9
6 container_name: skywalking-es
7 environment:
8 discovery.type: single-node
9 ES_JAVA_OPTS: "-Xms512m -Xmx512m"
10 volumes:
11 - es_data:/usr/share/elasticsearch/data
12 networks:
13 - skywalking-network
14
15 skywalking-oap:
16 image: apache/skywalking-oap-server:latest
17 container_name: skywalking-oap
18 restart: unless-stopped
19 environment:
20 SW_STORAGE: elasticsearch
21 SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
22 ports:
23 - "11800:11800"
24 - "12800:12800"
25 depends_on:
26 - elasticsearch
27 networks:
28 - skywalking-network
29
30 skywalking-ui:
31 image: apache/skywalking-ui:latest
32 container_name: skywalking-ui
33 restart: unless-stopped
34 environment:
35 SW_OAP_ADDRESS: http://skywalking-oap:12800
36 ports:
37 - "8080:8080"
38 depends_on:
39 - skywalking-oap
40 networks:
41 - skywalking-network
42
43volumes:
44 es_data:
45
46networks:
47 skywalking-network:
48 driver: bridge
49EOF
50
51# 2. Create the .env file
52cat > .env << 'EOF'
53# SkyWalking configuration
54EOF
55
56# 3. Start the services
57docker compose up -d
58
59# 4. View logs
60docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/skywalking/run | bash

Troubleshooting

  • OAP server fails to connect to Elasticsearch: Ensure Elasticsearch is fully started before OAP initialization and check network connectivity between containers
  • No trace data appearing in UI: Verify application agents are properly configured with correct OAP server address (skywalking-oap:11800) and service names
  • High memory usage in Elasticsearch: Adjust ES_JAVA_OPTS heap size settings and implement index lifecycle policies for data retention
  • UI shows 'OAP server connection failed': Check that OAP server port 12800 is accessible and SW_OAP_ADDRESS environment variable is correctly set
  • Agent connection refused errors: Ensure port 11800 is properly exposed and no firewall rules are blocking gRPC communication
  • Missing service topology connections: Verify that trace context headers are properly propagated between services and agents support your communication protocols

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space