0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【備忘録】docker compose で rails c コマンド

Last updated at Posted at 2022-12-24
##バックグラウンドでdockerを起動
docker compose up -d

##入りたいコンテナ名を確認
docker ps -a

##コンテナに入る
docker exec -it コンテナ名 /bin/bash

##shで入る場合
docker exec -it コンテナ名 sh

##railsコンソールを開く
rails c

##railsのコンソールが起動
irb(main):001:0>

##Modelのテスト(例)
モデル名.find(1)

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?