首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >docker-在另一个目录中编写运行入口点脚本

docker-在另一个目录中编写运行入口点脚本
EN

Stack Overflow用户
提问于 2018-06-04 06:44:52
回答 1查看 3.9K关注 0票数 2

我只是想知道如何在另一个目录中运行docker- another脚本。例如,

代码语言:javascript
复制
the-service:
   image: the-service
   container_name: the-service
   entrypoint: ./app/the/docker-entrypoint.sh 
   build: ./app/the
   ports:
     - 8080:8080

这里我得到了ERROR: for the-service Cannot start service the-service: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"./app/the-service/docker-entrypoint.sh\": stat ./app/the-service/docker-entrypoint.sh: no such file or directory": unknown ERROR: Encountered errors while bringing up the project.

docker-compose版本为2.1。那么运行这个脚本的正确方式是什么呢?

谢谢

EN

回答 1

Stack Overflow用户

发布于 2018-06-04 06:56:25

尝试使用WORKDIR options https://docs.docker.com/engine/reference/builder/#workdir将当前工作目录设置为docker文件中的应用程序位置

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50671648

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档