agent 设备代理部署在linux上,怎么使用docker去管理和启动?
<p> 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", 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: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI Emoji", sans-serif; font-size: 16px;"><span md-inline="plain">CMD ["python", "startup.py"]</span></p><p><br></p>
收藏(0)
分享
相关标签:
注意:本文归作者所有,未经作者允许,不得转载