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:Jump to 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 development7 Replies
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@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?
Your choice. Distrobox supports creating a comtainer from a docker image so you can work on and run your app at the same place.
I make GUI apps in Bazzite-DX, I have not touched devcontainers since I first tried using them and exclusively use distrobox
what would be the syntax for that? I looked but it's not obvious. creating a distrobox from my devcontainer would be nice
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
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