- Docker for Windows: https://docs.docker.com/docker-for-windows/install/#install-docker-for-windows
- Docker for Ubuntu: sudo apt install docker.io
- Docker-compose: https://docs.docker.com/compose/install/#install-compose
Create the files (Dockerfile, docker-compose.yml and Makefile) in the rails root folder and run commands:
make build # only first time
make up
# Build the docker image
make build
# Start the containers
make up # To stop use Ctrl + C
# Stop the containers if something wrong have happen on Ctrl + C
make stop
# Running bundle
make bundle
# Running db:migrate
make migrate
# Accessing the container
make bash # To stop use exit