mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 01:44:03 +03:00
eabc3966db
<!-- The PR description should answer 2 important questions: --> ### What Add `coreutils` to Docker images. ### How <!-- How is it trying to accomplish it (what are the implementation steps)? --> V3_GIT_ORIGIN_REV_ID: a614c47758b726729208428890586d5aabac0797
30 lines
723 B
Nix
30 lines
723 B
Nix
# This is a function that returns a derivation for a docker image.
|
|
{ dockerTools
|
|
, lib
|
|
, package
|
|
, image-name
|
|
, pkgs
|
|
, architecture ? null
|
|
, tag ? null # defaults to the output hash
|
|
, extraConfig ? { } # see config options at: https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions
|
|
}:
|
|
|
|
let
|
|
args = {
|
|
name = image-name;
|
|
created = "now";
|
|
contents = [ pkgs.cacert pkgs.bash pkgs.coreutils package ];
|
|
config = {
|
|
Entrypoint = [
|
|
"/bin/${package.pname}"
|
|
];
|
|
} // extraConfig;
|
|
}
|
|
// lib.optionalAttrs (tag != null) {
|
|
inherit tag;
|
|
} // lib.optionalAttrs (architecture != null) {
|
|
inherit architecture;
|
|
};
|
|
in
|
|
dockerTools.buildLayeredImage args
|