Skip to content

Commit d57c507

Browse files
authored
Merge pull request rails#54572 from Shopify/docs/podman-devcontainer
docs: add podman instructions for devcontainers [ci skip]
2 parents ccf59d6 + d3e1f32 commit d57c507

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

guides/source/contributing_to_ruby_on_rails.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ If you have [Visual Studio Code](https://code.visualstudio.com) and [Docker](htt
192192

193193
#### Using Dev Container CLI
194194

195-
Alternatively, with [Docker](https://www.docker.com) and [npm](https://github.com/npm/cli) installed, you can run [Dev Container CLI](https://github.com/devcontainers/cli) to utilize the [`.devcontainer`](https://github.com/rails/rails/tree/main/.devcontainer) configuration from the command line.
195+
With [npm](https://github.com/npm/cli) and [Docker](https://www.docker.com) installed, you can run [Dev Container CLI](https://github.com/devcontainers/cli) to utilize the [`.devcontainer`](https://github.com/rails/rails/tree/main/.devcontainer) configuration from the command line.
196196

197197
```bash
198198
$ npm install -g @devcontainers/cli
@@ -201,6 +201,23 @@ $ devcontainer up --workspace-folder .
201201
$ devcontainer exec --workspace-folder . bash
202202
```
203203

204+
#### Using Dev Container with Podman
205+
206+
You can use the [`.devcontainer`](https://github.com/rails/rails/tree/main/.devcontainer) configuration with [Podman](https://podman.io/). This method does not require any other tools besides Podman.
207+
208+
```bash
209+
$ podman machine init
210+
$ podman machine start
211+
$ tools/devcontainer up
212+
```
213+
214+
Then in a separate terminal:
215+
216+
```bash
217+
$ tools/devcontainer run-user-commands
218+
$ tools/devcontainer sh
219+
```
220+
204221
#### Using rails-dev-box
205222

206223
It's also possible to use the [rails-dev-box](https://github.com/rails/rails-dev-box) to get a development environment ready. However, the rails-dev-box uses Vagrant and Virtual Box which will not work on Macs with Apple silicon.

0 commit comments

Comments
 (0)