/demo-ruby-dockerize

Rails + Docker project to learn how to use these tools

Primary LanguageRubyMIT LicenseMIT

demo-ruby-dockerize

Rails + Docker project to learn how to use these tools

Source

Following the semaphoreci.com tutorial.

Steps

Get started with Docker

Watch the Get started with Docker video walkthrough from DockerCon 2020.

Use Dockerfile config from Docker Docs

Build the image

With docker build

$  docker build -t rails-toolbox .

docker build documentation.

-t flag to point to specify a repository and tag at which to save the new image if the build succeeds.

With docker-compose run

$  docker-compose run --no-deps web rails new . --force --database=postgresql

Since this changes the Gemfile, the image needs to be built again.

$  docker-compose build

Connect the database

$  docker-compose up