1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

docker-entrypoint.sh: 38: exec: bundle: not found

Posted at

##環境
Docker version 20.10.7
docker-compose version 1.29.2

##状況
docker-compose run webでrailsコマンドたたくとエラーを吐く

$ docker-compose run web bundle exec rails -v
Creating XXX_web_run ... done
/docker-entrypoint.sh: 38: exec: bundle: not found
ERROR: 127

##解決方法

$ docker-compose exec app bundle exec rails -v
Rails 6.1.3.2
  • docker-compose rundocker-compose execの違い:
    run を指定して実行した場合は新しくコンテナを立ち上げてから実行し、 exec を指定して実行した場合は既に立ち上がっているコンテナを使って実行します(参考記事抜粋)

  • appについては下記参照

##参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?