To ease the development of melange, we offer a script that builds
a Wolfi-based image with
the required tooling to compile and run melange. When running the
devenv, you'll drop into a Wolfi shell, with your local fork directory
will mounted in $PWD
.
To launch the development environment, simply run the script from the top of the melange environment:
# Clone the melange repo
git clone [email protected]:chainguard-dev/melange.git
cd melange
# Build and launch the devenv:
./hack/make-devenv.sh
_
_ __ ___ ___| | __ _ _ __ __ _ ___
| '_ ` _ \ / _ \ |/ _` | '_ \ / _` |/ _ \
| | | | | | __/ | (_| | | | | (_| | __/
|_| |_| |_|\___|_|\__,_|_| |_|\__, |\___|
|___/
Welcome to the melange development environment!
To run melange from your local fork run:
go run ./main.go
The image is built every time it is needed, it will be built using Chainguard's apko image.
The only requirement to run the melange development environment is to haver docker running in you local system. The script will take care of the rest.
The script will only build the Wolfi image when it cannot find it in the local docker daemon. If you need to rebuild it, simply delete it using docker:
docker rmi melange-inception:latest
Running the script again will force a clean build of the image.