diff --git a/poc-oci/check.sh b/poc-oci/check.sh new file mode 100644 index 0000000..fcd478b --- /dev/null +++ b/poc-oci/check.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +nix build -f default.nix +ls -l + +sh result > oci +IMGID=$(podman load < oci 2>&1 | tail -1 | awk '{ print $3 }') +rm -f oci result + +echo +echo ${IMGID} +echo "dive podman://${IMGID}" \ No newline at end of file diff --git a/poc-oci/default.nix b/poc-oci/default.nix new file mode 100644 index 0000000..d4cbc73 --- /dev/null +++ b/poc-oci/default.nix @@ -0,0 +1,17 @@ +{ + pkgs ? import {}, +}: +let + manifests = pkgs.writeText "bla" '' + here be dragons + ''; +in + pkgs.dockerTools.streamLayeredImage { + name = "blah"; + includeStorePaths = false; + fakeRootCommands = '' + cp -Lr ${manifests} my-text-file + cat my-text-file + rm -fr nix + ''; + }