Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bake-hcl: add function to access current time / build time #1201

Closed
tnaroska opened this issue Jul 7, 2022 · 0 comments · Fixed by #1214
Closed

bake-hcl: add function to access current time / build time #1201

tnaroska opened this issue Jul 7, 2022 · 0 comments · Fixed by #1214

Comments

@tnaroska
Copy link

tnaroska commented Jul 7, 2022

I was looking for a way to access the current time (or build time) in my docker-bake.hcl file but couldn't find an obvious way to do so.
There are some cty stdlib functions that work on timestamps (e.g. timeAdd, formatDate) but no obvious way to get the current time. I would suggest adding a wrapper function for time.Now() or maybe a builtin variable to access the build time.

Environment:

buildx   v0.8.2
buildkit v0.10.3
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 a pull request may close this issue.

1 participant