what about isotime

https://www.packer.io/docs/templates/engine.html

does that work?


{{isotime \"2006-01-02\"}}"


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virusvrij.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, Oct 4, 2017 at 1:30 PM, Raghava Karthik <[email protected]>
wrote:

> I'm trying to add docker image build date as label:
>
>   "builders":[{
>         "type": "docker",
>         "image": "centos:{{user `base-image-version`}}",
>         "pull": true,
>         "commit":true,
>         "changes": ["USER {{user `create-user`}}","LABEL
> build-date=**date**", "WORKDIR /{{user `work-directory`}}"]
>     }],
>
> The above doesn't work, how can i set this?
>
> Also i tried the answer from GitHub issue, but it too doesn't work.
>
>  "builders":[{
>         "type": "docker",
>         "image": "centos:{{user `base-image-version`}}",
>         "pull": true,
>         "commit":true,
>         "changes": ["USER {{user `create-user`}}","LABEL
> build-date={{timestamp}}", "WORKDIR /{{user `work-directory`}}"]
>     }],
>
>
> Thanks,
> Karthik
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/20e367de-d2ad-42cd-9bb6-a07d06382e60%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/20e367de-d2ad-42cd-9bb6-a07d06382e60%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0ezTGDrycei3k7gEqrvx-5p6FjAvYNyULuGR1YMhr54ZSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to