Docker 安装文档:https://docs.docker.com/engine/install/
Docker Compose 安装文档:https://docs.docker.com/compose/install/
- mkdir ~/halo && cd ~/halo
- touch ~/halo/docker-compose.yaml
- vim application.yaml application.yaml
version: "3"services:halo:image: halohub/halo:2.11container_name: halorestart: on-failure:3#network_mode: "host"volumes:- ./halo2:/root/.halo2ports:- "8090:8090"command:# 修改为自己已有的 MySQL 配置- --spring.r2dbc.url=r2dbc:pool:mysql://ip:3306/halo- --spring.r2dbc.username=root- --spring.r2dbc.password=password- --spring.sql.init.platform=mysql# 外部访问地址,请根据实际需要修改- --halo.external-url=http://localhost:8090/# 端口号 默认8090- --server.port=8090
- docker-compose up -d
原文:出处