Skip to content


fix(build): fix panic: got bad timestamp "" when Created not presen…
Browse files Browse the repository at this point in the history
…t in base image

Signed-off-by: Aleksei Igrychev <>
  • Loading branch information
alexey-igrychev committed Jul 2, 2024
1 parent 56bd2f4 commit 0e06711
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/docker/image_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ func NewInfoFromInspect(ref string, inspect *types.ImageInspect) *image.Info {

var created string
if inspect.Created != "" {
created = inspect.Created
} else {
created = "1970-01-01T00:00:00Z"

return &image.Info{
Name: ref,
Repository: repository,
Tag: tag,
Labels: inspect.Config.Labels,
OnBuild: inspect.Config.OnBuild,
Env: inspect.Config.Env,
CreatedAtUnixNano: image.MustParseTimestampString(inspect.Created).UnixNano(),
CreatedAtUnixNano: image.MustParseTimestampString(created).UnixNano(),
RepoDigest: repoDigest,
ID: inspect.ID,
ParentID: parentID,
Expand Down

0 comments on commit 0e06711

Please sign in to comment.