The Visual Studio Code Dev Containers extension lets you use a Docker container as a full-featured development environment.
Steps to install and use dev Containers -
Windows / macOs
-
If you are using windows, ensure WSL 2 back-end is enabled. Steps to install WSL2 - https://learn.microsoft.com/en-us/windows/wsl/install
-
Install Docker Desktop for Windows/Mac.
Linux
- Install docker
- Download and install vscode
- Install Dev Container extension for vscode.
Clone the repo and open it in vscode
git clone https://github.com/IRIS-NITK/IRIS-RoR-Bootcamp-2022
cd IRIS-RoR-Bootcamp-2022
code .
- Open the repo in VS code and press Ctrl + Shift + p to bring up the Command Palette,
and search for command Dev Containers: Reopen in Container and execute it. This uses the dev
container config file
inside
.devcontainer
folder to create a new dev container.
- The VS Code window will reload and start building the dev container. A progress notification provides status updates.
- After the build completes, VS Code will automatically connect to the container.
The folder will be reopened inside a Debian container.
The container has rvm
, node
and yarn
preinstalled so you can get started off working with rails.
Once done head over here, to learn about RVM and gemsets.