add meta attributes to all images

augment the images with meta attributes from the input packages.

and then use the meta.description as dockerhub metadata.
This commit is contained in:
zimbatm 2019-02-17 12:09:56 +01:00
parent 8cbbfe7009
commit 2aefa0599e
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
4 changed files with 72 additions and 59 deletions

View file

@ -10,44 +10,47 @@
, nix
, xz
}:
dockerTools.buildImageWithNixDb {
inherit (nix) name;
let
image = dockerTools.buildImageWithNixDb {
inherit (nix) name;
contents = [
./root
coreutils
# add /bin/sh
bash
nix
contents = [
./root
coreutils
# add /bin/sh
bash
nix
# runtime dependencies of nix
cacert
gitMinimal
gnutar
gzip
xz
# runtime dependencies of nix
cacert
gitMinimal
gnutar
gzip
xz
# for haskell binaries
iana-etc
];
extraCommands = ''
# for /usr/bin/env
mkdir usr
ln -s ../bin usr/bin
# make sure /tmp exists
mkdir -m 0777 tmp
'';
config = {
Cmd = [ "/bin/bash" ];
Env = [
"ENV=/etc/profile.d/nix.sh"
"NIX_PATH=nixpkgs=channel:nixpkgs-unstable"
"PAGER=cat"
"PATH=/usr/bin:/bin"
"SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt"
# for haskell binaries
iana-etc
];
extraCommands = ''
# for /usr/bin/env
mkdir usr
ln -s ../bin usr/bin
# make sure /tmp exists
mkdir -m 0777 tmp
'';
config = {
Cmd = [ "/bin/bash" ];
Env = [
"ENV=/etc/profile.d/nix.sh"
"NIX_PATH=nixpkgs=channel:nixpkgs-unstable"
"PAGER=cat"
"PATH=/usr/bin:/bin"
"SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt"
];
};
};
}
in
image // { meta = nix.meta // image.meta; }