Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

kadmuffin/develbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Develbox

A tool to create dev containers using Podman and Go. In other words, like JetPack's Devbox but worse.

Why this exists

After reading about JetPack's Devbox on HackerNews, I wanted to use it to prevent supply-chain attacks when installing packages from NPM or PyPi.

The issue was that Nix isn't available on Fedora Silverblue, as it currently doesn't comply with the FHS (Nix directory is located on /nix, but / is read-only on Silverblue) and has issues with SELinux. There are other ways to install it, like:

I could instead have used developments containers with VSCode now that I think about it.

So instead of choosing all of those good options, I decided to try to make a script that does something similar to Devbox and Toolbox but worse just to learn Golang.

What does that mean?

Mainly, it means that the code quality here probably is not the best. There are a ton of things that should be improved or made more secure.

I would fix them but my current knowledge of coding, containers, and Linux isn't enough to make this a better product.

TL;DR: It's best to not use this in your projects, as it is made for personal use.

Getting Started

If you are okay with all that, you can install this script by doing the following. First, we should visit the prerequisites.

Prerequisites

This project requires you to have installed

You can get them from your package manager usually with as go and podman.

Installing

You can get the project using go install like this.

go install github.com/kadmuffin/develbox@latest

Usage

It's recommended that you add .develbox/home to your.gitignore file.

Creating the container

You can now proceed to create the container with the following command.

develbox create

Configs file will be located at .develbox/config.json. See configs folder for documentation.

Opening the shell

After that you can enter the container using:

develbox enter

And stop the container with:

develbox stop

You can delete it using develbox trash too.

Managing packages

To add a package to the container we can run develbox add, for example, if we wish to add nano to the container:

develbox add nano

Now, if we want to delete the package, we use the develbox del command:

develbox del nano

Contributing

If you wish to contribute to this small repo, you are welcome to submit your pull request. Take into account that I'm a total noob at this, so explanations and patience are appreciated!

License

This project is under the Apache 2.0 License.

Acknowledgments

  • Billie Thompson - Provided README Template - PurpleBooth
  • Jetpack's Devbox - Inspiration - Devbox
  • Toolbox - Used as reference for some things (for example, how to load /dev) - Toolbox
  • Martin Viereck - Helpful Wiki - x11docker
  • And even more projects in CREDITS.