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?

More than 3 years have passed since last update.

Dockerfileやdocker-compose.ymlで悩まないruby on railsのDocker環境構築

Posted at

Dockerfileやdocker-compose.ymlをよく知らないへっぽこエンジニアなので、
DockerHubのbitnamiのイメージを使って環境構築してみる。

$ mkdir ~/myapp && cd ~/myapp
$ curl -LO https://raw.githubusercontent.com/bitnami/bitnami-docker-rails/master/docker-compose.yml
$ docker-compose up
myapp_1    | => Booting Puma
myapp_1    | => Rails 6.1.4.1 application starting in development 
myapp_1    | => Run `bin/rails server --help` for more startup options
myapp_1    | Puma starting in single mode...
myapp_1    | * Puma version: 5.4.0 (ruby 2.6.8-p205) ("Super Flight")
myapp_1    | *  Min threads: 5
myapp_1    | *  Max threads: 5
myapp_1    | *  Environment: development
myapp_1    | *          PID: 1
myapp_1    | * Listening on http://0.0.0.0:3000
myapp_1    | Use Ctrl-C to stop

などとコンソールに表示されたら、
http://localhost:3000/
めでたくrailsが走ってるのが確認できる。

余裕ができたら、Docker-compose.ymlなどをみてみようかな。

ネタ元は

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?