#!
(pronounced shebang) is a Unix convention that's typically used for scripting languages like Python and Bash. This abuses it to let you package applications in a cross-distro and cross-platform way. This example Dockerfile is a fullstack server that includes a backend, a database and a UI, all in a single file.
It's kinda like Cosmopolitan Libc but for packaging applications.
Why not?
Probably not.
If you want.
Maybe.
No.
Yes.
chmod +x ./Dockerfile
./Dockerfile
Then go to http://127.0.0.1:8080
I've used
podman run
on a shebang line to run a containerized version of node instead of the system node. For a specific app where you know the right paths to mount into the container-- it worked fine for a specific case.Otherwise, container images already run everywhere that Docker and Podman run and already a single file, leaving abusing Dockerfiles as a fun exercise.