docker-compose up caused orthomcl_orthomcl_1 exited with code 0

user977828 asked:

I have 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}"

This is my 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 

Unfortunately, docker-compose up caused the below error:

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

What did I miss?

My answer:


You seem to have missed a CMD or ENTRYPOINT to specify a program to run in the container.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.