Karp

docker-compose up启动又停止,需要加tty为true
如果docker-compose.yml如下,则用docker-compose up -d启动起来的容器可能会立即...
扫描右侧二维码阅读全文
06
2020/04

docker-compose up启动又停止,需要加tty为true

如果docker-compose.yml如下,则用docker-compose up -d启动起来的容器可能会立即停止。

version: '2'
services:
  mir-http-repo:
    image: 172.16.101.192/mir_docker/centos6.7_repo_jinzhong:v1.0
    container_name: mir-http-repo
    ports:
      - 8088:8088

解决办法:加上ttytrue

version: '2'
services:
  mir-http-repo:
    image: 172.16.101.192/mir_docker/centos6.7_repo_jinzhong:v1.0
    container_name: mir-http-repo
    ports:
      - 8088:8088
    tty: true
Last modification:April 6th, 2020 at 12:12 am

Leave a Comment