docker-compose up 导致 orthomcl_orthomcl_1 退出,代码为 0

docker-compose up 导致 orthomcl_orthomcl_1 退出,代码为 0

我有cat orthomcl/Dockerfile

FROM debian:stretch-backports


RUN apt-get update  && apt-get install -y --no-install-recommends \
    wget \
    cpanminus \
    build-essential \
        libmariadbclient-dev \
        python \
        ca-certificates \
    && rm -rf /var/lib/apt/lists/* 

RUN wget http://www.micans.org/mcl/src/mcl-latest.tar.gz
RUN tar xvf mcl-latest.tar.gz
RUN cd mcl-* && ./configure && make && make install
RUN wget https://orthomcl.org/common/downloads/software/v2.0/orthomclSoftware-v2.0.9.tar.gz
RUN tar xvf orthomclSoftware-v2.0.9.tar.gz

RUN cpanm DBI DBD::mysql
RUN mkdir diamond \
    && cd diamond \
    && wget http://github.com/bbuchfink/diamond/releases/download/v0.9.14/diamond-linux64.tar.gz \
    && tar xvf diamond-linux64.tar.gz \
    && rm *.tar.gz

#COPY my.cnf /etc/mysql/
#COPY run_orthomcl.py /bin/
ENV PATH="/diamond:/orthomclSoftware-v2.0.9/bin:${PATH}"

这是我的docker-compose.yml

orthomcl:
    build: orthomcl
    restart: always
    links:
        - db
    volumes:
        - ./output_dir/:/output_dir

db:
  image: mariadb
  restart: always
  environment:
    - MYSQL_ROOT_PASSWORD=PAssw0rd
  ports:
    - "3306:3306" 
  volumes:
    - ./mysql/:/docker-entrypoint-initdb.d 

不幸的是,docker-compose up引起了以下错误:

Starting orthomcl_db_1 ... done
Starting orthomcl_orthomcl_1 ... done
Attaching to orthomcl_db_1, orthomcl_orthomcl_1
...
db_1        | 2019-05-02 11:31:05 0 [Note] mysqld: ready for connections.
db_1        | Version: '10.3.14-MariaDB-1:10.3.14+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
orthomcl_orthomcl_1 exited with code 0
orthomcl_orthomcl_1 exited with code 0

我错过了什么?

答案1

您似乎错过了一个 CMD 或 ENTRYPOINT 来指定在容器中运行的程序。

相关内容