Adding a POC for basic OCI images
This commit is contained in:
parent
37c49982f5
commit
6f0834519e
14
poc-oci/check.sh
Normal file
14
poc-oci/check.sh
Normal file
@ -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}"
|
17
poc-oci/default.nix
Normal file
17
poc-oci/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> {},
|
||||
}:
|
||||
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
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user