agent 设备代理部署在linux上,怎么使用docker去管理和启动?

提问 2 163
wangxianyun
wangxianyun LV1 2023年11月8日 02:23 发表
<p>&nbsp;&nbsp;&nbsp;&nbsp;agent这个项目,如果放到linux下,是否可以由docker管理。<br>是否同engine一样的道理,先创建镜像。然后再启动镜像。</p><p>但是agent这个项目,没有dockerfile这个文件,无法创建镜像。</p><p>如果可以由docker管理的话:dockerFile这样写有问题吗?</p><p cid="n0" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">FROM python:3.8</span></p><p cid="n2" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">MAINTAINER "liuma"</span></p><p cid="n3" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">COPY android /liuma/android</span></p><p cid="n4" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">COPY apple /liuma/apple</span></p><p cid="n5" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">COPY requirements.txt /liuma/</span></p><p cid="n6" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">COPY tools/ /liuma/tools</span></p><p cid="n7" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">COPY startup.py /liuma/</span></p><p cid="n8" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">WORKDIR /liuma</span></p><p cid="n9" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">RUN pip install -r requirements.txt -i </span><span md-inline="url" spellcheck="false" style="word-break: break-all;"><a href="http://pypi.douban.com/simple/" style="cursor: pointer; color: rgb(65, 131, 196); -webkit-user-drag: none;">http://pypi.douban.com/simple/</a></span><span md-inline="plain"> --trusted-host pypi.douban.com</span></p><p cid="n10" mdtype="paragraph" style="line-height: inherit; orphans: 4; margin-top: 0.8em; margin-bottom: 0.8em; white-space-collapse: preserve; position: relative; color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif; font-size: 16px;"><span md-inline="plain">CMD ["python", "startup.py"]</span></p><p><br></p>
收藏(0)  分享
相关标签: agent
注意:本文归作者所有,未经作者允许,不得转载
2个回复
  • Chras-fu
    2023年11月8日 07:45
    不行的,目前不支持容器部署
    1 0
相关帖子
没有相关数据
源码地址
微信扫描二维码添加作者微信加入社区官方交流群
layui