# Developing Discourse using a Dev Container

**URL:** https://meta.discourse.org/t/developing-discourse-using-a-dev-container/336366
**Category:** Developer Guides
**Created:** [November 15, 2024, 4:44pm UTC](https://meta.discourse.org/t/developing-discourse-using-a-dev-container/336366 "2024-11-15T16:44:08Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![Eviepayne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviepayne/32/352733_2.png) [@Eviepayne](https://meta.discourse.org/u/Eviepayne)
#### Post date: [April 9, 2026, 3:37am UTC](https://meta.discourse.org/t/developing-discourse-using-a-dev-container/336366/10 "2026-04-09T03:37:52Z")

</div>

For those who are not married to vscode, this is the process to do devcontainers with just the devcontainers cli.  
Assuming you have devcontainers installed already:

# Build Container

```bash
git clone https://github.com/discourse/discourse && cd discourse
devcontainer build
devcontainer up --workspace-folder .
devcontainer exec bash

```

Once inside the container you need to build the deps

```bash
pnpm install
bundle install
SKIP_MULTISITE=1 SKIP_TEST_DATABASE=1 bin/rake db:create db:migrate
DISCOURSE_DEV_ALLOW_ANON_TO_IMPERSONATE=1 bin/ember-cli -u > /dev/null 2>&1 &

```

> - Change /dev/null to a different file if you want logs
> - If you want to leave it running while disconnected from the shell run `disown`

# Access discourse

```bash
docker inspect <name> | jq '.[0].NetworkSettings.Networks.bridge.IPAddress'

```

This will reveal the ipaddress assigned to the container.  
In your browser open `http://<ipaddress>:4200`

# Cleanup

To delete your devcontainer (the down/delete options are not developed)  
Retrieve the name of the container  
`docker ps`  
stop and delete the container:  
`docker stop <name> && docker rm <name>`  
delete the volumes:  
`docker volume rm discourse-node_modules discourse-pg discourse-redis`

---

_[View the full topic](https://meta.discourse.org/t/developing-discourse-using-a-dev-container/336366)._
