可以查看下方博客进行安装 https://blog.csdn.net/weixin_44209403/article/details/103232900 下载最新版的docker-compose文件 若是github访问太慢,可以用daocloud下载 添加可执行权限 测试安装结果 导入如下yml文件 在服务器中创建文件夹,将上方yml文件导入到服务器文件夹中 在该文件夹下输入如下命令,即可快速搭建好博客环境 注意:命令中“docker-compose”是你的yml文件的名称 最后,输入docker ps,可以查看已经有两个服务启动了 注意:第一次访问需要设置你的用户名和密码,还有邮箱。
一、安装docker
二、安装docker-compose
1.从github上下载docker-compose二进制文件安装
sudo curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-uname -s-uname -m -o /usr/local/bin/docker-compose
sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.1/docker-compose-uname -s-uname -m -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
三、导入编写好的yml文件,进行环境和项目搭建
version: '3.3' services: db: image: mysql:5.7 volumes: - db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: - db image: wordpress:latest ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress WORDPRESS_DB_NAME: wordpress volumes: db_data: {}
docker-compose up -d
然后在浏览器中输入你的服务器ip和端口8000就可以访问你的博客了
本网页所有视频内容由 imoviebox边看边下-网页视频下载, iurlBox网页地址收藏管理器 下载并得到。
ImovieBox网页视频下载器 下载地址: ImovieBox网页视频下载器-最新版本下载
本文章由: imapbox邮箱云存储,邮箱网盘,ImageBox 图片批量下载器,网页图片批量下载专家,网页图片批量下载器,获取到文章图片,imoviebox网页视频批量下载器,下载视频内容,为您提供.
阅读和此文章类似的: 全球云计算