-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimal environments #4
Comments
TODO: test it https://github.com/cleverca22/not-os |
Using sha256sum to compare environmentsImprove it! Use sha512sum too? # env | sort | sha256sum
env | grep -v HOSTNAME | sort | sha256sum podman \
run \
--interactive=true \
--tty=false \
--rm=true \
--user=0 \
docker.io/library/busybox \
<<'COMMANDS'
env | grep -v HOSTNAME | sort | sha256sum
COMMANDS env > env.txt
SHA="$(sha256sum env.txt | cut -d ' ' -f 1)"
echo "$SHA env.txt" | sha256sum --check
echo "$SHA env.txt" | sha256sum --check --status |
TODO: make examples, refactor... nix \
build \
github:ratsclub/dotfiles/54fc62c5cdc15176f7511381b20cfb0c524bfeec#homeConfigurations.textual.activationPackage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Abstract
An really great quote:
Toybox vs BusyBox - Rob Landley, hobbyist, start=721&end=777
nix develop nixpkgs#toybox --command sh -c 'cd "$TMPDIR" && source $stdenv/setup && genericBuild'
nix develop nixpkgs#pkgsStatic.toybox --command sh -c 'cd "$TMPDIR" && source $stdenv/setup && genericBuild'
It removes every binary and only compiles the toybox
sh
:Refs.:
Using old Ubuntu OCI images
podman run ubuntu:10.04 bash -c 'lsb_release -a'
podman image inspect --format='{{index .RepoDigests 0}}' docker.io/tianon/toybox
podman run docker.io/tianon/toybox toybox
TODOs:
TODO: https://discourse.nixos.org/t/build-a-yocto-rootfs-inside-nix/2643/26
TODO: https://github.com/hjones2199/ush
The busybox-sandbox-shell
TODO: add metadata infos
nix \ shell \ --ignore-environment \ nixpkgs#busybox-sandbox-shell \ --command \ sh \ -c \ 'echo Hi!'
The toybox
Toybox vs BusyBox - Rob Landley, hobbyist
podman \ run \ --log-level=error \ --privileged=false \ --device=/dev/fuse \ --device=/dev/kvm \ --env="DISPLAY=${DISPLAY:-:0.0}" \ --interactive=true \ --network=slirp4netns \ --tty=true \ --rm=true \ --user=guest \ docker.io/tianon/toybox \ sh
Refs:
Refs.:
podman run --rm ubuntu:latest apt show '~i' -a
Refs.:
TODO: https://unix.stackexchange.com/a/665012
nix \ shell \ --ignore-environment \ nixpkgs#busybox \ --command \ sh \ -c \ 'ls -al'
nix \ shell \ --ignore-environment \ nixpkgs#busybox-sandbox-shell \ --command \ sh \ -c \ 'echo Hi!'
nix run nixpkgs#toybox file .
TODO: document other examples that for now are spread
appimage-run and stean-run
The text was updated successfully, but these errors were encountered: