![402bb1c56e66df8c442c2a6cbd570b06.png](https://img-blog.csdnimg.cn/img_convert/402bb1c56e66df8c442c2a6cbd570b06.png)
一:前言
搞了一台华为云服务器,并写下这篇文章来测试并用docker快速搭建2048网站
![19bd724abc8581a2f56c66a4d8be3d60.png](https://img-blog.csdnimg.cn/img_convert/19bd724abc8581a2f56c66a4d8be3d60.png)
二:步骤
2.1连接华为云服务器
![deebf5706de567bd00629be1056cff88.png](https://img-blog.csdnimg.cn/img_convert/deebf5706de567bd00629be1056cff88.png)
进入控制台
![4f2641ccffb271a9c067a51c29df271a.png](https://img-blog.csdnimg.cn/img_convert/4f2641ccffb271a9c067a51c29df271a.png)
![2c5c26644faf49d51cae3d17b2793817.png](https://img-blog.csdnimg.cn/img_convert/2c5c26644faf49d51cae3d17b2793817.png)
之后输入账号和密码登录。
2.2安装docker和配置daocloud加速器
`curl -sSL https:``//get.daocloud.io/docker | sh`
该安装包适用于 Ubuntu,Debian,Centos 等大部分主流 Linux 发行版,DaoCloud 后台会每隔 3 小时同步一次 Docker 官方资源,确保您第一时间获取最新的 Docker 安装文件。 检测docker 是否安装成功 使用 docker --version
`curl -sSL https:``//get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io`
该脚本可以将 --registry-mirror 加入到你的 Docker 配置文件 /etc/docker/daemon.json 中。适用于 Ubuntu14.04、Debian、CentOS6 、CentOS7、Fedora、Arch Linux、openSUSE Leap 42.1,其他版本可能有细微不同。更多详情请访问文档。(可以注册一个daocloud的账号) daocloud帮助文档: http://guide.daocloud.io/dcs/daocloud-9153148.html
daocloud镜像市场: https://hub.daocloud.io/
2.3 2048Docker拉取
网页版2048docker 进去后发现镜像地址和版本以及说明
最新版本: latest
镜像地址: http://daocloud.io/daocloud/dao-2048
然后在终端中运行
`docker pull daocloud.io/daocloud/dao-``2048``:latest`
看是否拉取成功(看本机中是否有2048 docker)
`docker images`
![ca118b0c775486f53ff3d2909176ac68.png](https://img-blog.csdnimg.cn/img_convert/ca118b0c775486f53ff3d2909176ac68.png)
2.4 2048 的部署
`docker run -d -it --name ``2048` `-p ``9094``:``80` `daocloud.io/daocloud/dao-``2048`
之后就可以打开 主机ip:9094
看到轻松部署的网页版2048了,是不是很简单啊! 记得要先配置华为云的安全组策略
![cd76c4516b1f6c57b421e272b8019503.png](https://img-blog.csdnimg.cn/img_convert/cd76c4516b1f6c57b421e272b8019503.png)
![26931a209eb51c78bb971fd5991fd2a6.png](https://img-blog.csdnimg.cn/img_convert/26931a209eb51c78bb971fd5991fd2a6.png)
![cfb7ba45066540959b15c23f76cd29b4.png](https://img-blog.csdnimg.cn/img_convert/cfb7ba45066540959b15c23f76cd29b4.png)
之后输入ip:9094就可以看见2048网站啦!!!
![8eef3e690401abc139653034cd74e852.png](https://img-blog.csdnimg.cn/img_convert/8eef3e690401abc139653034cd74e852.png)
往后可能还会有更多的docker搭建技巧哦,鉴于篇幅,先发一个2048的搭建。
2.5 测速以及服务器综合性能评测
本机系统是ubuntu18.04 1核2g1m
`wget -qO- --no-check-certificate https:``//raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash`
![02144e35da3a6a260d2078773b9d4b78.png](https://img-blog.csdnimg.cn/img_convert/02144e35da3a6a260d2078773b9d4b78.png)
![3bc8bf383ce2f85c14eb1e81d9d97ff4.png](https://img-blog.csdnimg.cn/img_convert/3bc8bf383ce2f85c14eb1e81d9d97ff4.png)
总体感觉还可以,带宽性能也足。值得推荐
2.6
搭建bt面板 参考链接 https://www.bt.cn/bbs/thread-19376-1-1.html
三:总结
华为云服务器性能不错