magic containerized builds
Project description
redbuild
magic containerized builds
overview
redbuild enables software to be built in pre-defined environments using the power of containerization. with podman installed, any supported project can be built with a single command. projects provide a build.docker and build.sh for defining the build environment and build steps.
redbuild: just add water!
install stable version from pypi
# with uv
uv tool install redbuild
# with pipx (recommended)
pipx install redbuild
# with vanilla pip
pip install redbuild
build from source
local install:
uv sync --locked
uv run redbuild --help
containerized bootstrap (optional):
./bootstrap/redbuild.sh
try the example!
cd example
redbuild build
detailed usage
creating the build environment and build script
-
create a
build.dockerfile in the project root. this file should contain aFROMdirective for the base image to use for the build environment. the build environment should contain all the tools necessary to build the project. it's also very important that the last line of the dockerfile isCMD ["/bin/bash", "-l"]. this is necessary for redbuild to work.an example
build.docker:FROM debian:bookworm-slim # install dependencies RUN apt-get update && apt-get install -y \ bash \ curl wget xz-utils \ gcc make libc6-dev libcurl4 \ git libxml2 \ && rm -rf /var/lib/apt/lists/* && apt autoremove -y && apt clean # install dlang RUN curl -fsS https://dlang.org/install.sh | bash -s install ldc-1.30.0 \ && echo "source ~/dlang/ldc-1.30.0/activate" >> ~/.bashrc # set up main to run bash (necessary for redbuild) CMD ["/bin/bash", "-l"]
-
create a
build.shfile in the project root. this file should contain the steps necessary to build the project. the build script should be written to be run in the build environment.build.sh:#!/usr/bin/env bash set -e dub build --compiler ldc2 -B release
make it executable:
chmod +x build.sh
that's it! now you can build the project with redbuild build, copy it into the project root, and run it. you can also open an interactive shell in the build environment with redbuild shell.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file redbuild-2.6.0.tar.gz.
File metadata
- Download URL: redbuild-2.6.0.tar.gz
- Upload date:
- Size: 416.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ce308c64963632414d81687e60c15d7c0b64195c46c5fca4079e93daf89c577
|
|
| MD5 |
a1fb813bcf20ed21d1ebb49a4e649265
|
|
| BLAKE2b-256 |
941de7d0ac0069154afb8ec82437106dfe1958cd88c7e6573a064c5ba10d3e06
|
File details
Details for the file redbuild-2.6.0-py3-none-any.whl.
File metadata
- Download URL: redbuild-2.6.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f556c6bb0c57fec2f5caca267d4fc63af2e8760a3b7280be06441bc4a6a45b05
|
|
| MD5 |
9e42495526b50929ff96f49c6e1ffeff
|
|
| BLAKE2b-256 |
c840a7126ce17baa7e8371d13d8966ca3b1b352f1e35a232a50789c62ac9f61f
|