1 unstable release
0.1.0 | Jan 4, 2025 |
---|
#171 in Unix APIs
156 downloads per month
21KB
270 lines
docker-spade
Build Linux images for Spade.
$ spade-docker --help
Usage: spade-docker <command> [<args>]
Manage Spade docker images.
Options:
--help, help display usage information
Commands:
build Build a new image.
list List built images.
clean Prune built images.
data-directory Print data directory.
You can see fine-grained usage information by passing --help
for each subcommand.
Prerequisites
Please install buildx, the new build system for Docker, if you don't have it already (the old one is deprecated). Also, make sure to use the official Docker daemon.
Install
git clone https://github.com/ethanuppal/spade-docker
cd spade-docker
# to install locally
chmod u+x ./spade-docker
# to install to $PATH
cargo install --path .
Here, we're using the helper script, but you can similarly install
spade-docker
system-wide with cargo install --path .
(and then use it as
spade-docker
without the ./
prefix).
Local Usage
Building an image
# build an image for x86_64 with the given Spade/swim versions
./spade-docker build --arch x86_64
Then, using the output hash, you can run the image in a terminal with docker run --rm -it HASH
.
Managing images
# list all images managed by the tool
./spade-docker list
# remove all images managed by the tool
./spade-docker clean
Uninstall
First, prune all images managed by the tool:
./spade-docker clean
Then, remove the directory used by the tool to store data:
rm -rf "$(./spade-docker data-directory 2>/dev/null)"
Finally, you can rm -rf
the cloned directory and cargo uninstall spade-docker
if applicable.tjj
Dependencies
~2–13MB
~78K SLoC