Staticbox is a static compilation of Busybox.
If your filesystem is corrupted or deleted, a dynamically linked executable such as the default busybox binary on Alpine Linux will cease to function. Having a statically linked executable allows busybox to function even after, for example, the C standard library is deleted (i.e. ld-musl-x86_64.so.1).
Staticbox can be used as a standalone Docker image or added to an existing Docker image:
FROM dwolla/staticbox:latest as staticbox
COPY --from=staticbox /staticbox /staticbox
ENV PATH=/staticbox/bin:$PATH
The impetus for creating Staticbox came from the inability to use the durable-task-plugin Jenkins Plugin with kaniko. The Durable Task Plugin allows processes to be run asynchronously on a build node and withstand disconnection of the slave agent. As such, this plugin assumes touch and sleep binaries are available and functioning on the agent. When kaniko deletes the filesystem between build stages, it eliminates these binaries and the libraries they depend on causing a deluge of error logs:
sh: touch: not found
sh: sleep: not found
Using Staticbox and adding its directory as a Docker volume fixes this issue. Docker volumes are whitelisted by kaniko, meaning that they are neither deleted between stages, nor added to the Docker image.
while true; do echo "Hello, Staticbox!"; sleep 3; done
ls | grep -v staticbox | xargs rm -rf 2> /dev/null
Note: The above command will attempt to delete all files under / except for /staticbox.
Content type
Image
Digest
Size
3.3 MB
Last updated
over 7 years ago
docker pull dwolla/staticbox