Install Docker and Docker Compose
1.Clone typecho-docker
git clone https://github.com/hanekoo/typecho-docker.git
2.Clone typecho
program to ./typecho/
git clone https://github.com/typecho/typecho.git ./typecho/
3.Open the .env
file and modify it as needed
vim .env
4.Run it
docker-compose up -d
mariadb data path :data/matiadb/
typecho program path:typecho/
database address:
just input mariadb service name:mariadb
,or get the mariadb
service container IP:
docker ps
#CONTAINER ID IMAGE ... NAMES
#24e68b1da482 mariadb:latest ... typecho-docker_mariadb_1
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' typecho-docker_mariadb_1
#172.20.0.2
For more installation steps, please refer to:Typecho document