为什么 'irb' shell 在 docker 命令中立即退出

问题描述

这是我的 Dockerfile。

FROM ruby:2.4.0-alpine
RUN mkdir /app
WORKDIR /app
COPY Gemfile ./Gemfile
COPY Gemfile.lock ./Gemfile.lock
RUN bundle install -j 20
COPY . .

这是我的 docker-compose 文件:

version: '2'
services:
  web:
    build: .
    command: "irb"
    volumes:
      - .:/app

我预计 docker-compose up 会打开一个 irb 外壳,但是外壳会立即退出。为什么会退出?

如何通过docker使用irb shell?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)