HUB
Sign inSign up
staticbox logo

dwolla/staticbox

By dwolla

•Updated over 7 years ago

Image
0

1.3K

dwolla/staticbox repository overview

⁠Staticbox

Staticbox is a static compilation of Busybox⁠.

⁠Why?

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).

⁠Usage

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

⁠Use Case

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.

⁠Testing

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.

Tag summary

Content type

Image

Digest

Size

3.3 MB

Last updated

over 7 years ago

docker pull dwolla/staticbox