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:
parent
8cbbfe7009
commit
2aefa0599e
4 changed files with 72 additions and 59 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue