Skip to content

Instantly share code, notes, and snippets.

@nothub
Last active May 3, 2023 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nothub/e129ffde1dbfbe6f404f8664f81d5754 to your computer and use it in GitHub Desktop.
Save nothub/e129ffde1dbfbe6f404f8664f81d5754 to your computer and use it in GitHub Desktop.
~25kB container with cosmopolitan binary
#!/usr/bin/env sh
set -ex
cat > Dockerfile << "EOF"
FROM scratch
COPY deathstar.com /deathstar
CMD ["/deathstar"]
EOF
if ! test -f "deathstar.com"; then
wget https://justine.lol/cosmopolitan/deathstar.com
chmod +x deathstar.com
./deathstar.com --assimilate
fi
docker build -t "deathstar" .
docker run -it --rm "deathstar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment