简体   繁体   中英

Docker run fail with ruby

I have a little problem, when i run my container this:

docker run -it emails_request cucumber -t @teste_inserindo_email

It's ok.

But, when i run this:

docker run it emails_request

Where my @teste_inserindo_emails, is on my dockerfile

WORKDIR /app
COPY Gemfile .
RUN bundle install && bundle clean
COPY . /app
EXPOSE 80
RUN cucumber -t @teste_inserindo_email
#CMD ["cucumber", "-t", " @teste_inserindo_email"]  

Not found, return:

$ docker run -t emails_request
irb(main):001:0>

Or:

$ docker run emails_request
Switch to inspect mode.

what's your question exactly? you can just run it manually by firing up a container with an interactive terminal from your image, and then run the commands you want, or have a script in the image (or mounted as a volume) and then pass the script as the entry command instead.

docker run -it IMAGE_ID bash (for running manual commands)

if you want to use a script instead, put an ENTRYPOINT script in your Dockerfile instead

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM