Skip to content

Add devcontainer configuration #5264

@gravitystorm

Description

@gravitystorm

We added support for Docker-based development in 2021 (based on a PR started in 2019). At this time there were no clear conventions for setting up docker-based development environments, so we did our own thing.

Nowadays, a number of tools support the "Development Container" specification. This provides a few additional benefits, for example tighter integration between code editors and the containers (e.g. running the rubocop process within the container, but seeing the syntax highlighting in your editor UI). Dev containers are supported by vscode and intellij code editors, and are also a part of Github Codespaces. Codespaces allow developers to make code changes, run tests and make PRs, all without installing anything locally. So it would be nice to fully support that too.

It's also notable that rails 7.2 added built-in support for devcontainers configuration, so running bundle exec rails devcontainer gets us started on the setup and generating the configuration files.

I therefore propose:

  • We set up the devcontainer configuration and make sure it works.
  • We move the docker part of CI to use the devcontainer configuration.
  • We remove the original Docker configuration and update the documentation.
  • We also consider removing the vagrant configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxDeveloper Experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions