README
¶
Develbox
A tool to create project-specific containers using Podman and Go.
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:
- Matthewpi's guide to manually installing Nix
- Changing to another distro, like NixOS directly
- Yajo's fork (still hasn't been merged into upstream)
- Nix User Chroot (I became aware of this one too late into the project)
- Nix Portable (Just discovered this one too)
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
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.
Documentation
¶
There is no documentation for this package.
Directories
¶
Path | Synopsis |
---|---|
dockerfile
Creates a dockerfile based on the config file
|
Creates a dockerfile based on the config file |
pkg
|
|
pipes
The pipes package creates a FIFO pipe and provides functions to read/write to it.
|
The pipes package creates a FIFO pipe and provides functions to read/write to it. |