docker-compor a resposta interativamente para a saída do docker

1

Eu tenho o seguinte contêiner docker:

FROM debian:stretch-backports
RUN apt-get update  && apt-get install -y --no-install-recommends \
        build-essential \
        ruby ruby-dev \
        curl wget \
        gnupg \
        git \
        ncbi-blast+

RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
        apt-get update  && apt-get install -y --no-install-recommends \
        nodejs npm && \
        rm -rf /var/lib/apt/lists/*

RUN wget -c https://github.com/wurmlab/sequenceserver/archive/1.1.0.beta10.tar.gz  && \
    apt-get update  && apt-get install -y --no-install-recommends zlib1g-dev && \
    gem install bundler && \
    tar xfvz 1.1.0.beta10.tar.gz && \
    cd sequenceserver-1.1.0.beta10 && \
    npm install && \
    bundle install

#RUN mkdir /db
VOLUME ["/db"]
EXPOSE 4567
WORKDIR /sequenceserver-1.1.0.beta10
ENTRYPOINT ["bundle", "exec", "bin/sequenceserver", "-d", "/db"]

Quando inicio o contêiner, ele me faz perguntas interativas para configurar o banco de dados:

$ docker run --rm -ti -p 4567:4567 -v $(pwd)/db:/db seqserver
fatal: Not a git repository (or any of the parent directories): .git

Could not find BLAST+ databases in: /db.

Search for FASTA files (.fa, .fasta, .fna) in '/db' and try
creating BLAST+ databases? [y/n] (Default: y).

>> y

Searching ...


FASTA file: /db/sequence.fasta
FASTA type: nucleotide
Proceed? [y/n] (Default: y): y
Enter a database title or will use 'sequence': Escherichia coli str. K-12 substr. MG1655, complete genome
Enter taxid (optional): 


Building a new DB, current time: 07/02/2018 00:37:08
New DB name:   /db/sequence.fasta
New DB title:  Escherichia coli str. K-12 substr. MG1655, complete genome
Sequence type: Nucleotide
Keep MBits: T
Maximum file size: 1000000000B
Adding sequences from FASTA; added 1 sequences in 0.487213 seconds.

SEF-EEB-123137:sequenceserver lorencm$ ls db
sequence.fasta      sequence.fasta.nhi  sequence.fasta.nin  sequence.fasta.nsd  sequence.fasta.nsq
sequence.fasta.nhd  sequence.fasta.nhr  sequence.fasta.nog  sequence.fasta.nsi
SEF-EEB-123137:sequenceserver lorencm$ docker run --rm -ti -p 4567:4567 -v $(pwd)/db:/db seqserver
fatal: Not a git repository (or any of the parent directories): .git
[2018-07-02 00:37:33] WARN  Will listen on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--host option).
** SequenceServer is ready.
   Go to http://localhost:4567 in your browser and start BLASTing!
   Press CTRL+C to quit.

Em seguida, quero usar o Dockerfile acima com o docker-compose

$ cat docker-compose.yml

sequenceserver:
  build: sequenceserver
#  restart: always
  ports:
    - "4567:4567"
  volumes:
    - ./data/sequenceserver:/db 

mas infelizmente eu não recebo mais as perguntas apenas a seguinte saída:

$ docker-compose up

...
sequenceserver_1  | Enter taxid (optional): taxid should be a number
sequenceserver_1  | Enter taxid (optional): taxid should be a number
sequenceserver_1  | Enter taxid (optional): taxid should be a number
sequenceserver_1  | Enter taxid (optional): taxid should be a number
sequenceserver_1  | Enter taxid (optional): taxid should be a number
sequenceserver_1  | Enter taxid (optional): taxid should be a number
sequenceserver_1  | Enter taxid (optional): taxid should be a number

Como é possível fazer a configuração interativa com o docker-compose ou existe outra maneira?

Obrigado antecipadamente.

    
por Mic 02.07.2018 / 03:09

1 resposta

1

Você precisa iniciar este comando, tente o seguinte:

$ docker-compose up -d 
    
por 02.07.2018 / 05:57