Local development with devcontainers

Hi! Devcontainers are the recommended way to develop software in Bazzite DX as I understand. While it works great for cloud software, how do I develop local software with it? Most importantly, how can I run my application in a devcontainer and have it appear? I previously used noVNC for this and remoted into the devcontainer, but naturally this is a clunkier and a less comfortable developer experience.
Solution:
I just make a distrobox with distroshelf, run distrobox enter (the distrobox) in my IDE's terminal, and then use it. I doubt it's as flawlessly reproducible as rebuilding the container on every use, but it's close enough for my development
Jump to solution
7 Replies
mrvictorywin (Ping on reply)
Using distrobox, you can: * Run the application in the dev container as if it's not in a container. Simply run your executable ie. xterm * Export apps to system's application launcher. Run distrobox-export application-name
Vadi
VadiOP2mo ago
@mrvictorywin (Ping on reply) could you help clarify, do I still use a devcontainer to build my app in and then distrobox to run it, or do I build it entirely in distrobox?
mrvictorywin (Ping on reply)
Your choice. Distrobox supports creating a comtainer from a docker image so you can work on and run your app at the same place.
TealMango
TealMango2mo ago
I make GUI apps in Bazzite-DX, I have not touched devcontainers since I first tried using them and exclusively use distrobox
Vadi
VadiOP2mo ago
what would be the syntax for that? I looked but it's not obvious. creating a distrobox from my devcontainer would be nice
mrvictorywin (Ping on reply)
distrobox -i <image name on docker.io or full URL> -n <name of container> --image/-i: image to use for the container default: registry.fedoraproject.org/fedora-toolbox:latest
Solution
TealMango
TealMango2mo ago
I just make a distrobox with distroshelf, run distrobox enter (the distrobox) in my IDE's terminal, and then use it. I doubt it's as flawlessly reproducible as rebuilding the container on every use, but it's close enough for my development

Did you find this page helpful?