1 Star 0 Fork 2.4K

于滨瑞/docker-compose

forked from zhengqingya/docker-compose 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose-linux.html 11.27 KB
一键复制 编辑 原始数据 按行查看 历史
zhengqingya 提交于 2022-08-22 10:40 . update doc
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Markmap</title>
<style>
* {
margin: 0;
padding: 0;
}
#mindmap {
display: block;
width: 100vw;
height: 100vh;
}
</style>
</head>
<body>
<svg id="mindmap"></svg>
<script src="https://cdn.jsdelivr.net/npm/d3@5"></script>
<script src="https://cdn.jsdelivr.net/npm/markmap-lib@0.7.11/dist/browser/view.min.js"></script>
<script>
((t,a,e,n)=>{const{Markmap:o,loadPlugins:s}=window.markmap;(a?a(s,e,n):Promise.resolve()).then(()=>{o.create("svg#mindmap",null,t)})})({"t":"heading","d":1,"v":"docker-compose-linux","c":[{"t":"heading","d":2,"v":"安装docker","c":[{"t":"fence","d":3,"v":"<pre><code class=\"language-shell\"># 通过yum源安装docker\nsudo yum -y install docker\n# 启动docker\nsudo systemctl start docker\n# 开机自启\nsudo systemctl enable docker\n</code></pre>"}]},{"t":"heading","d":2,"v":"<code>docker-compose</code>安装","c":[{"t":"fence","d":3,"v":"<pre><code class=\"language-shell\"># 如果有pip则直接执行此命令即可: sudo pip install -U docker-compose\n\n# 安装依赖\nyum -y install epel-release\n# 安装PIP\nyum -y install python-pip\n# 升级PIP\npip install --upgrade pip\n# 验证pip 版本\npip --version\n# 安装docker compose\npip install -U docker-compose==1.25.0\n# 验证docker compose版本\ndocker-compose --version\n# 安装补全插件\ncurl -L https://raw.githubusercontent.com/docker/compose/1.25.0/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose\n</code></pre>"}]},{"t":"heading","d":2,"v":"<code>docker-compose</code>卸载","c":[{"t":"fence","d":3,"v":"<pre><code class=\"language-shell\"># pip卸载\npip uninstall docker-compose\n</code></pre>"}]},{"t":"heading","d":2,"v":"<code>docker-compose</code>相关命令","c":[{"t":"fence","d":3,"v":"<pre><code class=\"language-shell\"># 构建镜像\ndocker-compose build\n# 构建镜像,--no-cache表示不用缓存,否则在重新编辑Dockerfile后再build可能会直接使用缓存而导致新编辑内容不生效\ndocker-compose build --no-cache\n# config 校验文件格式是否正确\ndocker-compose -f docker-compose.yml config\n# 运行服务\nocker-compose up -d\n# 启动/停止服务\ndocker-compose start/stop 服务名\n# 停止服务\ndocker-compose down\n# 查看容器日志\ndocker logs -f 容器ID\n# 查看镜像\ndocker-compose images\n# 拉取镜像\ndocker-compose pull 镜像名\n</code></pre>"}]},{"t":"heading","d":2,"v":"常用shell组合","c":[{"t":"fence","d":3,"v":"<pre><code class=\"language-shell\"># 删除所有容器\ndocker stop `docker ps -q -a` | xargs docker rm\n# 删除所有标签为none的镜像\ndocker images|grep \\&lt;none\\>|awk '{print $3}'|xargs docker rmi\n# 查找容器IP地址\ndocker inspect 容器名或ID | grep &quot;IPAddress&quot;\n# 创建网段, 名称: mynet, 分配两个容器在同一网段中 (这样子才可以互相通信)\ndocker network create mynet\ndocker run -d --net mynet --name container1 my_image\ndocker run -it --net mynet --name container1 another_image\n</code></pre>"}]},{"t":"heading","d":2,"v":"环境准备","c":[{"t":"fence","d":3,"v":"<pre><code class=\"language-shell\"># 安装git命令: yum install -y git\ngit clone https://gitee.com/zhengqingya/docker-compose.git\ncd docker-compose/Linux\n</code></pre>"}]},{"t":"heading","d":2,"v":"运行服务","c":[{"t":"heading","d":3,"v":"Portainer","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-portainer.yml -p portainer up -d\n\n-p:项目名称\n-f:指定docker-compose.yml文件路径\n-d:后台启动\n</code></pre>"}]},{"t":"heading","d":3,"v":"MySQL","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-mysql.yml -p mysql up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Yearning","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-yearning.yml -p yearning up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Oracle18c","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-oracle18c.yml -p oracle18c up -d\n</code></pre>"},{"t":"blockquote","d":4,"v":"","c":[{"t":"paragraph","d":5,"v":"配置参考:<a href=\"https://zhengqing.blog.csdn.net/article/details/103296040\" title=\"\" target=\"_blank\" rel=\"noopener noreferrer\">Docker(9) 安装Oracle18c</a>"}]}]},{"t":"heading","d":3,"v":"Couchbase","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-couchbase.yml -p couchbase up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Redis","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-redis.yml -p redis up -d\n</code></pre>"},{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker exec -it redis redis-cli -a 123456 # 密码为123456\n</code></pre>"}]},{"t":"heading","d":3,"v":"Jrebel","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-jrebel.yml -p jrebel up -d\n</code></pre>"},{"t":"ordered_list","d":4,"v":"","c":[{"t":"list_item","d":5,"v":"1. 激活地址: <code>ip地址:8888/UUID</code> -> 注:UUID可以自己生成,并且必须是UUID才能通过验证 -> <a href=\"http://www.uuid.online/\" title=\"\" target=\"_blank\" rel=\"noopener noreferrer\">UUID在线生成</a>"},{"t":"list_item","d":5,"v":"2. 邮箱随意填写"}]}]},{"t":"heading","d":3,"v":"Nginx","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-nginx.yml -p nginx up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Elasticsearch","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-elasticsearch.yml -p elasticsearch up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"RabbitMQ","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-rabbitmq.yml -p rabbitmq up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"ActiveMQ","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-activemq.yml -p activemq up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"BaiduPCS-Web","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-baidupcs-web.yml -p baidupcs-web up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"MinIO","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-minio.yml -p minio up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Nacos","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-nacos.yml -p nacos up -d\n\n# mysql数据库版 【 需自己建库`nacos_config`, 并执行`/Windows/nacos_xxx/nacos-mysql.sql`脚本 】\ndocker-compose -f docker-compose-nacos-mysql.yml -p nacos up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Sentinel","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-sentinel.yml -p sentinel up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Kafka","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-kafka.yml -p kafka up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Tomcat","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-tomcat.yml -p tomcat up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"GitLab","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-gitlab.yml -p gitlab up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Jenkins","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-jenkins.yml -p jenkins up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Nextcloud - 多端同步网盘","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-nextcloud.yml -p nextcloud up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Walle - 支持多用户多语言部署平台","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-walle.yml -p walle up -d &amp;&amp; docker-compose -f docker-compose-walle.yml logs -f\n</code></pre>"},{"t":"fence","d":4,"v":"<pre><code class=\"language-\">超管:super@walle-web.io \\ Walle123\n所有者:owner@walle-web.io \\ Walle123\n负责人:master@walle-web.io \\ Walle123\n开发者:developer@walle-web.io \\ Walle123\n访客:reporter@walle-web.io \\ Walle123\n</code></pre>"}]},{"t":"heading","d":3,"v":"Grafana - 开源数据可视化工具(数据监控、数据统计、警报)","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-grafana.yml -p grafana up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Grafana Loki - 一个水平可扩展,高可用性,多租户的日志聚合系统","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\"># 先授权,否则会报错:`cannot create directory '/var/lib/grafana/plugins': Permission denied`\nchmod 777 $PWD/grafana_promtail_loki/grafana/data\nchmod 777 $PWD/grafana_promtail_loki/grafana/log\n\n# 运行\ndocker-compose -f docker-compose-grafana-promtail-loki.yml -p grafana_promtail_loki up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"Graylog - 日志管理工具","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-graylog.yml -p graylog_demo up -d\n</code></pre>"}]},{"t":"heading","d":3,"v":"FastDFS - 分布式文件系统","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-fastdfs.yml -p fastdfs up -d\n</code></pre>"},{"t":"heading","d":4,"v":"测试","c":[{"t":"fence","d":5,"v":"<pre><code class=\"language-shell\"># 等待出现如下日志信息:\n# [2020-07-24 09:11:43] INFO - file: tracker_client_thread.c, line: 310, successfully connect to tracker server 39.106.45.72:22122, as a tracker client, my ip is 172.16.9.76\n\n# 进入storage容器\ndocker exec -it fastdfs_storage /bin/bash\n# 进入`/var/fdfs`目录\ncd /var/fdfs\n# 执行如下命令,会返回在storage存储文件的路径信息,然后拼接上ip地址即可测试访问\n/usr/bin/fdfs_upload_file /etc/fdfs/client.conf test.jpg\n# ex:\nhttp://www.zhengqingya.com:8888/group1/M00/00/00/rBEAAl8aYsuABe4wAAhfG6Hv0Jw357.jpg\n</code></pre>"}]}]},{"t":"heading","d":3,"v":"YApi - 高效、易用、功能强大的api管理平台","c":[{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\">docker-compose -f docker-compose-yapi.yml -p yapi up -d\n</code></pre>"},{"t":"fence","d":4,"v":"<pre><code class=\"language-shell\"> log: mongodb load success...\n 初始化管理员账号成功,账号名:&quot;admin@admin.com&quot;,密码:&quot;ymfe.org&quot;\n部署成功,请切换到部署目录,输入: &quot;node vendors/server/app.js&quot; 指令启动服务器, 然后在浏览器打开 http://127.0.0.1:3000 访问\nlog: -------------------------------------swaggerSyncUtils constructor-----------------------------------------------\nlog: 服务已启动,请打开下面链接访问: \nhttp://127.0.0.1:3000/\nlog: mongodb load success...\n</code></pre>"}]}]}]},(t,a,e)=>t(a,e),["prism"],{"mathJax":false,"prism":true})
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Docker
1
https://gitee.com/yu-binrui/docker-compose.git
git@gitee.com:yu-binrui/docker-compose.git
yu-binrui
docker-compose
docker-compose
master

搜索帮助