Sign inSign up

malasaur/dummy

By malasaur

•Updated about 1 month ago

A minimal Docker image that does absolutely nothing

Image
Developer tools
1

70

malasaur/dummy repository overview

⁠dummy

dummy is a minimal Docker image whose goal is... doing nothing. Absolutely nothing.

It contains no shell, utilities, package manager, configuration or other meaningful functionality whatsoever. Weighs about 15KBs but uses 300KBs of RAM for some reason. It consumes essentially no CPU.

It's useless. It just exists.

⁠Why?

Sometimes you need a Docker container to exist even though you don't actually need a container.

For example, Caddy Docker Proxy⁠ uses Docker container labels as a convenient way to configure Caddy. This works beautifully for services running inside Docker, but what if the thing you want to proxy isn't a Docker container?

You can put the labels on the Caddy container itself, but changing them requires recreating/restarting the CDP container.

Instead:

services:
  my-external-service:
    image: malasaur/dummy
    labels:
      caddy: example.example.com
      caddy.reverse_proxy: 192.168.1.100:8080

CDP will detect the new container and read the labels off of it. The container itself doesn't do anything though. It exists solely to have labels.

⁠How?

The image is based on Docker's scratch image and contains a single executable file. The executable is built with a very short (~6 lines) assembly source file that simply invokes the SYS_pause system call, continuously.

⁠Supported architectures

Currently, only linux/amd64 is supported, but support for other architectures is planned. Because apparently even a program that does nothing needs to be portable.

⁠Usage

Just run it:

docker run -d --name dummy malasaur/dummy

Or, more realistically, use it in a compose.yaml file:

services:
  dummy:
    image: malasaur/dummy
    # ...

⁠Building

The project uses just⁠ for simplicity.

just build-amd64 builds the image for amd64. just clean removes build artifacts.

⁠Contributing

Contributions are welcome! Please open an issue or submit a pull request. Any help with porting this to other architectures is much appreciated. Just don't make it bloated or something.

⁠FAQ

⁠Is this a stripped-down BusyBox or Alpine?

No.

⁠Can I use it to build other Docker images?

No.

⁠Does it contain a package manager?

No.

⁠Does it contain a shell?

No.

⁠Does it contain a process manager?

No.

⁠Does it contain literally anything useful?

No.

⁠Is malasaur/dummy pronounced "malasaur is a dummy"?

No.

⁠What does it do?

No.

⁠Then why does it exist?

No.

Tag summary

Content type

Image

Digest

sha256:349ed3811…

Size

241 Bytes

Last updated

about 1 month ago

docker pull malasaur/dummy