- 确保安装了docker和docker-compose
sudo docker -v
Docker version 20.10.12, build 20.10.12-0ubuntu4
sudo docker-compose -v
docker-compose version 1.29.2, build unknown
- 编写docker-compose.yml
yml
version: "3.1"
services:
skywalking-oap:
image: apache/skywalking-oap-server:9.0.0
container_name: skywalking-oap
restart: always
environment:
- TZ=Asia/Shanghai
- JAVA_OPTS=-Xms1024m -Xmx2048m
ports:
- 11800:11800
- 12800:12800
skywalking-ui:
image: apache/skywalking-ui:9.0.0
container_name: skywalking-ui
restart: always
ports:
- 1080:8080
environment:
- SW_OAP_ADDRESS=http://skywalking-oap:12800
-
执行docker-compsoe脚本
sudo docker-compose -f docker-compose.yml up -d
-
卸载服务(不用时可以卸载)
sudo docker-compose down
sudo docker-compose rm