dockerTools: Always set imageTag attribute
The image tag can be specified or generated from the output hash. Previously, a generated tag could be recovered from the evaluated image with some string operations. However, with the introduction of streamLayeredImage, it's not feasible to compute the generated tag yourself. With this change, the imageTag attribute is set unconditionally, for the buildImage, buildLayeredImage, streamLayeredImage functions.
This commit is contained in:
@@ -364,4 +364,22 @@ rec {
|
||||
created = "now";
|
||||
};
|
||||
|
||||
# buildImage without explicit tag
|
||||
bashNoTag = pkgs.dockerTools.buildImage {
|
||||
name = "bash-no-tag";
|
||||
contents = pkgs.bashInteractive;
|
||||
};
|
||||
|
||||
# buildLayeredImage without explicit tag
|
||||
bashNoTagLayered = pkgs.dockerTools.buildLayeredImage {
|
||||
name = "bash-no-tag-layered";
|
||||
contents = pkgs.bashInteractive;
|
||||
};
|
||||
|
||||
# buildImage without explicit tag
|
||||
bashNoTagStreamLayered = pkgs.dockerTools.streamLayeredImage {
|
||||
name = "bash-no-tag-stream-layered";
|
||||
contents = pkgs.bashInteractive;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user