GitHub user dosubot[bot] added a comment to the discussion: How to create a 
visualization plugin in superset 6.0.0 using docker

<!-- Answer -->
Yes, you can do the entire visualization plugin development workflow inside the 
superset-node container—no need to install Node.js or npm locally. The Docker 
Compose setup provides a container with all the required Node tooling, and your 
local code is mounted into the container for live updates[^1][^2][^3].

Here’s how you can do it:

1. Start the dev environment:  
   ```bash
   docker compose up
   ```

2. Open a shell in the superset-node container:  
   ```bash
   docker compose exec superset-node bash
   ```

3. Inside the container, scaffold your plugin using the Yeoman generator (yo), 
install dependencies, and build or run the dev server as needed. For example:
   ```bash
   cd /app/superset-frontend/packages/generator-superset
   npm i
   npm link
   mkdir /tmp/superset-plugin-chart-hello-world
   cd /tmp/superset-plugin-chart-hello-world
   yo @superset-ui/superset
   npm i --force
   npm run build
   # or for live development:
   npm run dev
   ```

4. To register your plugin, install it as a dependency in 
/app/superset-frontend and update MainPreset.js as usual.

5. Run the frontend dev server inside the container:
   ```bash
   cd /app/superset-frontend
   npm run dev-server
   ```

Caveats:  
- File system performance inside containers can be slower, especially on 
Mac/Windows.  
- You can edit code on your host or inside the container; changes are reflected 
live.  
- If you hit performance issues, you can always switch to running npm commands 
on your host, but this is optional[^4].

[^1]: [Superset Docker Compose mounts local code for live 
updates](https://github.com/apache/superset/pull/30655)  
[^2]: [Frontend build and dev server run inside 
container](https://github.com/apache/superset/blob/master/docker/docker-frontend.sh)
  
[^3]: [Official dev docs: Node service in Docker 
Compose](https://github.com/apache/superset/blob/master/docs/docs/contributing/development.mdx)
  
[^4]: [Performance notes and 
alternatives](https://github.com/apache/superset/pull/30279)


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/d54cf17a-b458-486b-917b-f48165d7046f?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/d54cf17a-b458-486b-917b-f48165d7046f?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/d54cf17a-b458-486b-917b-f48165d7046f?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/d54cf17a-b458-486b-917b-f48165d7046f?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/d54cf17a-b458-486b-917b-f48165d7046f?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/d54cf17a-b458-486b-917b-f48165d7046f?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/d54cf17a-b458-486b-917b-f48165d7046f?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Yes%2C%20you%20can%20do%20the%20entire%20visualization%20plugin%20development%20workflow%20inside%20the%20superset-node%20container%E2%80%94no%20need%20to%20install%20Node.js%20or%20npm%20locally.%20The%20Docker%20Compose%20setup%20provides%20a%20container%20with%20all%20the%20required%20Node%20tooling%2C%20and%20your%20local%20code%20is%20mounted%20into%20the%20container%20for%20live%20updates%5B%5E1%5D%5B%5E2%5D%5B%5E3%5D.%0A%0AHere%E2%80%99s%20how%20you%20can%20do%20it%3A%0A%0A1.%20Start%20the%20dev%20environment%3A%20%20%0A%20%20%20%60%60%60bash%0A%20%20%20docker%20compose%20up%0A%20%20%20%60%60%60%0A%0A2.%20Open%20a%20shell%20in%20the%20superset-node%20container%3A%20%20%0A%20%20%20%60%60%60bash%0A%20%20%20docker%20compose%20exec%20superset-node%
 
20bash%0A%20%20%20%60%60%60%0A%0A3.%20Inside%20the%20container%2C%20scaffold%20your%20plugin%20using%20the%20Yeoman%20generator%20%28yo%29%2C%20install%20dependencies%2C%20and%20build%20or%20run%20the%20dev%20server%20as%20needed.%20For%20example%3A%0A%20%20%20%60%60%60bash%0A%20%20%20cd%20/app/superset-frontend/packages/generator-superset%0A%20%20%20npm%20i%0A%20%20%20npm%20link%0A%20%20%20mkdir%20/tmp/superset-plugin-chart-hello-world%0A%20%20%20cd%20/tmp/superset-plugin-chart-hello-world%0A%20%20%20yo%20%40superset-ui/superset%0A%20%20%20npm%20i%20--force%0A%20%20%20npm%20run%20build%0A%20%20%20%23%20or%20for%20live%20development%3A%0A%20%20%20npm%20run%20dev%0A%20%20%20%60%60%60%0A%0A4.%20To%20register%20your%20plugin%2C%20install%20it%20as%20a%20dependency%20in%20/app/superset-frontend%20and%20update%20MainPreset.js%20as%20usual.%0A%0A5.%20Run%20the%20frontend%20dev%20server%20inside%20the%20container%3A%0A%20%20%20%60%60%60bash%0A%20%20%20cd%20/app/superset-frontend%0A%20%20%2
 
0npm%20run%20dev-server%0A%20%20%20%60%60%60%0A%0ACaveats%3A%20%20%0A-%20File%20system%20performance%20inside%20containers%20can%20be%20slower%2C%20especially%20on%20Mac/Windows.%20%20%0A-%20You%20can%20edit%20code%20on%20your%20host%20or%20inside%20the%20container%3B%20changes%20are%20reflected%20live.%20%20%0A-%20If%20you%20hit%20performance%20issues%2C%20you%20can%20always%20switch%20to%20running%20npm%20commands%20on%20your%20host%2C%20but%20this%20is%20optional%5B%5E4%5D.%0A%0A%5B%5E1%5D%3A%20%5BSuperset%20Docker%20Compose%20mounts%20local%20code%20for%20live%20updates%5D%28https%3A//github.com/apache/superset/pull/30655%29%20%20%0A%5B%5E2%5D%3A%20%5BFrontend%20build%20and%20dev%20server%20run%20inside%20container%5D%28https%3A//github.com/apache/superset/blob/master/docker/docker-frontend.sh%29%20%20%0A%5B%5E3%5D%3A%20%5BOfficial%20dev%20docs%3A%20Node%20service%20in%20Docker%20Compose%5D%28https%3A//github.com/apache/superset/blob/master/docs/docs/contributing/development.mdx
 
%29%20%20%0A%5B%5E4%5D%3A%20%5BPerformance%20notes%20and%20alternatives%5D%28https%3A//github.com/apache/superset/pull/30279%29)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37031)

GitHub link: 
https://github.com/apache/superset/discussions/37031#discussioncomment-15464014

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to