【发布时间】:2021-06-09 12:38:47
【问题描述】:
这是我的 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 shell,但是 shell 会立即退出。为什么会退出?
如何通过 docker 使用 irb shell?
【问题讨论】:
标签: ruby docker docker-compose irb