- 确保安装了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
version: "3.1"
services: skywalking-oap:image: apache/skywalking-oap-server:9.0.0container_name: skywalking-oaprestart: alwaysenvironment:- TZ=Asia/Shanghai- JAVA_OPTS=-Xms1024m -Xmx2048mports:- 11800:11800- 12800:12800skywalking-ui:image: apache/skywalking-ui:9.0.0container_name: skywalking-uirestart: alwaysports:- 1080:8080environment:- SW_OAP_ADDRESS=http://skywalking-oap:12800
- 执行docker-compsoe脚本
sudo docker-compose -f docker-compose.yml up -d
![请添加图片描述](https://img-blog.csdnimg.cn/1b0d87d540fb4bf39921666f23c6d8df.png)
- 卸载服务(不用时可以卸载)
sudo docker-compose down
sudo docker-compose rm
- 访问http://localhost:1080/