Skip to content

Conversation

@cpuguy83
Copy link
Collaborator

@cpuguy83 cpuguy83 commented Nov 23, 2024

Set image config created time

Before this was just using whatever created time was set on the base
image config which was incorrect.

Example using the docker buildx bake runc-jammy-container command:

Before:

docker image ls | grep runc
runc                                          jammy             8d1d42e074f3   25 minutes ago   228MB

After:

docker image ls | grep runc
runc                                          jammy             03c24620c8fa   5 seconds ago    228MB

Note: how the created time before was 25mins ago (b/c apparently the base
jammy image was recently updated, I've seen this be 2 weeks) compared to
after its 5 seconds ago.

This just had the wrong logic so it was outputing the container rootfs
to the filesystem instead of to the image store.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 requested a review from a team as a code owner November 23, 2024 01:09
Before this was just using whatever created time was set on the base
image config which was incorrect.

Example using the `docker buildx bake runc-jammy-container` command:

Before:

docker image ls | grep runc
runc                                          jammy             8d1d42e074f3   25 minutes ago   228MB

After:

  docker image ls | grep runc
  runc                                          jammy             03c24620c8fa   5 seconds ago    228MB

**Note**: how the created time before was 25mins ago (b/c apparently the base
jammy image was recently updated, I've seen this be 2 weeks) compared to
after its 5 seconds ago.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 3 changed files in this pull request and generated no suggestions.

Files not reviewed (1)
  • docker-bake.hcl: Language not supported
Comments skipped due to low confidence (1)

frontend/build.go:94

  • Ensure that the new behavior of setting the image creation time is covered by tests.
cfg.Created = &now

@cpuguy83 cpuguy83 merged commit 3325e64 into project-dalec:main Dec 5, 2024
9 checks passed
@cpuguy83 cpuguy83 deleted the set_image_create branch December 5, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants