This project aims to provide an example of how to utilize Docker to build a Ruby on Rails application.
This documentation is being written with:
➭ docker-compose pull app
➭ docker-compose build app
There is also a convenience script in hooks/
that is used by Docker Cloud, and you can use it too:
➭ ./hooks/build
➭ docker-compose up app
The container will expose port 3000 on the host machine - to see the port mapping use the command below.
➭ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d17a963767a8 mikeantonelli/docker-rails-compose:0.1.0 "bin/rails s -b 0.0.…" 11 seconds ago Up 14 seconds 0.0.0.0:32777->3000/tcp docker-rails-compose_app_1
In the above example, the application will be available at http://localhost:32777
.
➭ docker-compose run test
There is also a convenience script in hooks/
that is used by Docker Cloud, and you can use it too:
➭ ./hooks/test
Visual Studio Code configuration is provided in .vscode/
.
Please feel free to log an issue or propose changes to this project. I hope that you find it helpful and would like to keep it relevant.