百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

dockrails

> 后端框架
开源

使用 Docker (在开发中) 生成和运行 Rails 环境的简单 CLI!

281 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

使用 Docker (在开发中) 生成和运行 Rails 环境的简单 CLI!

Simple CLI to Generate and Run a Rails environment with Docker!

(using Docker, Docker-Compose and Docker-Sync behind the scenes)

About

Many of us have been struggling to setup a usable and efficient docker development environment for Rails App

This Gem include a CLI that generate your docker environment then provide a simple command to run it.

Web/Job containers sync code base from your Rails App in realtime, letting you code on you Mac and run in the same time everything from the container

Bundler Gems, DB and Redis data are persisted across restart and you can use ByeBug or Pry out of the box easily.

Currently the CLI offers a Docker environment with the option of:

  • PGSQL or MYSQL Database
  • Redis Database
  • Web and Job (Sidekiq) container

You can expand this scope very easily by modifying the output docker files generated.

Install

gem install dockrails

Requirements

  • Docker Toolbox
  • brew install unison

Commands

Create a folder on top of your Rails App, add your App inside it, then run:

  • dockrails init

Answer the different questions to build your docker environment and then you are ready to run it!

Start the containers:

  • dockrails start

Stop/Remove the containers:

  • dockrails clean

Show live tail of logs:

  • dockrails logs

Show live tail of logs for a container:

  • dockrails logs web

Build/Rebuild the docker image:

  • dockrails build

Restart a container:

  • dockrails restart CONTAINER

Run a command inside a container:

  • dockrails run CONTAINER COMMAND (ex: dockrails run web bundle install)

Attach TTY to a container (ex: for debugging with ByeBug or Pry):

  • dockrails attach CONTAINER

Folder structure

my-docker-rails-env/
  bundle/
  data/
    sql/
    redis/
  Dockerfile
  docker-compose.yml
  docker-sync.yml
  YOUR_RAILS_APP/

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyclidocker-environmentrails

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架