- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试使用以下 Docker compose 文件和 Dockerfile 运行 centos7 容器-
version: "2" data:
build:
context: ./docker-build
dockerfile: Dockerfile.data
restart: always
ports:
- "8082:8082"
command: bash
Dockerfile:
FROM centos:7
RUN yum -y update
CMD /bin/sh
容器不断重启,我不知道原因,如何解决这个问题?
最佳答案
一旦主进程退出,容器就会停止。就您而言,主进程是 shell(/bin/sh
或 bash
)。没有附加 TTY 的 shell 会立即退出。
如果您想让容器保持运行,请向容器添加 TTY;
使用docker run
时;
以交互方式运行容器;
docker run -it centos:7 bash
在后台运行容器(“分离”,-d
);
docker run -dit centos:7 bash
使用docker-compose.yml
时:
version: "2"
services:
data:
build:
context: ./docker-build
dockerfile: Dockerfile.data
restart: always
ports:
- "8082:8082"
command: bash
tty: true
关于linux - centos7容器不断重启,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48270223/
如果这不是一个错误,那就是另一个错误。如果不是那样的话,那就是别的东西了。我觉得我的项目已经改变了很多,现在只是试图解决代码签名问题,结果一切都搞砸了。我严格按照说明进行操作,但出现错误,例如当前的“
我不确定是否有一些我不知道的内置变量或规则,或者 make 是否有问题,或者我只是疯了。 对于我的一个项目,我有一个如下的 makefile: CC=g++ CFLAGS=-O3 `libpng-co
我有大约 10 个 div,它们必须不断翻转,每个 div 延迟 3 秒 这个 codrops 链接的最后一个效果是我正在寻找的,但无需单击 div http://tympanus.net/Devel
我如何使用 jQuery 持续运行 PHP 脚本并每秒获取响应,以及将鼠标上的少量数据发送到同一脚本? 我真的必须添加一些随机扩展才能让这么简单的计时器工作吗? 最佳答案 To iterate is
JBoss 4.x EJB 3.0 我见过如下代码(大大简化): @Stateless @TransactionAttribute(TransactionAttributeType.NOT_SUPPO
使用 PHPStorm,我试图忽略每次尝试进行 git 提交时 pop 的 workspace.xml。 我的 .gitignore 看起来像: /.idea/ .idea/workspace.xml
我是一名优秀的程序员,十分优秀!