# Bluefin - Using distrobox with vscode tasks

**URL:** <https://universal-blue.discourse.group/t/bluefin-using-distrobox-with-vscode-tasks/8448>\
**Category:** Bluefin\
**Created:** [May 14, 2025, 9:02am UTC](https://universal-blue.discourse.group/t/bluefin-using-distrobox-with-vscode-tasks/8448 "2025-05-14T09:02:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![klmcw](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@klmcw](https://universal-blue.discourse.group/u/klmcw)\
**Post date:** [May 14, 2025, 9:02am UTC](https://universal-blue.discourse.group/t/bluefin-using-distrobox-with-vscode-tasks/8448/1 "2025-05-14T09:02:28Z")

</div>

# Bluefin - Using distrobox with vscode tasks

I have performed 4 experiments thus far, and this one supplied unexpected glee.

_Sometimes you just need to get things done. So reach into your toolbox and voila!_

- [Bluefin - use podman distrobox container in vscode](https://universal-blue.discourse.group/t/bluefin-use-podman-distrobox-container-in-vscode/6193)
- [Bluefin - use docker distrobox container in vscode](https://universal-blue.discourse.group/t/bluefin-use-docker-distrobox-container-in-vscode/6195)
- [Bluefin - rely on OCI layer sharing for distrobox and devcontainer](https://universal-blue.discourse.group/t/bluefin-rely-on-oci-layer-sharing-for-distrobox-and-devcontainer/6519)
- [**Bluefin - Using distrobox with vscode tasks**](https://universal-blue.discourse.group/t/bluefin-using-distrobox-with-vscode-tasks/8448)

## Problem Statement

As a developer using one of the bluefin-dx bootc images, I would like:

- Given a VS Code project that needs multiple processes to start testing
- One of the processes can run on the host given what I have installed with `brew` or installed into my `$HOME` dir
- But one of the processes needs to run in a `distrobox` running on my host

I really _should_ define a devcontainer, but …

## Approach

Given the context described above I opted to construct a _compound_ vscode task.

One of the tasks just executes with what I have on the host.

The other task uses `distrobox enter box-name -- command` to execute on my running `distrobox`.

But the first task ties them both together for the DX for which I was looking.

> **Expand to see sample .vscode/tasks.json**
>
> ```auto
> {
> "version": "2.0.0",
> "tasks": [
> {
> "label": "Full Stack",
> "dependsOn": [
> "Tailwind Dev Server",
> "Django Dev Server",
> ]
> },
> {
> "label": "Tailwind Dev Server",
> "type": "shell",
> "command": "distrobox",
> "args": [
> "enter",
> "fedora41-python-dx",
> "--",
> "pnpm",
> "run",
> "dev"
> ],
> "options": {
> "cwd": "${workspaceFolder}"
> }
> },
> {
> "label": "Django Dev Server",
> "type": "shell",
> "command": "pdm",
> "args": [
> "manage",
> "runserver"
> ],
> "options": {
> "cwd": "${workspaceFolder}"
> },
> "problemMatcher": [
> "$python"
> ]
> }
> ]
> }
> 
> ```

Use the Command Palette command `Tasks: Run Task` and select `Full Stack` (first item in the `.vscode/tasks.json` file) from the drop down to launch all processes to start developing.

This will run `pnpm run dev` in the `fedora41-python-dx` distrobox, and `pdm manage runserver` on the host. They will start in separate vscode terminal processes.

Enjoy!

# References

1. [Integrate with External Tools via Tasks](https://code.visualstudio.com/docs/debugtest/tasks)
2. [Bluefin - rely on OCI layer sharing for distrobox and devcontainer](https://universal-blue.discourse.group/t/bluefin-rely-on-oci-layer-sharing-for-distrobox-and-devcontainer/6519)
3. [GitHub - klmcwhirter/oci-shared-images: Bluefin - rely on OCI layer sharing for distrobox and devcontainer](https://github.com/klmcwhirter/oci-shared-images)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/univeral_blue/original/2X/e/e39f7d1952979cf23b0f8d634e025fb38da50026.png) [@system](https://universal-blue.discourse.group/u/system)\
**Post date:** [August 12, 2025, 9:02am UTC](https://universal-blue.discourse.group/t/bluefin-using-distrobox-with-vscode-tasks/8448/2 "2025-08-12T09:02:58Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
