Comment 2 for bug 1902010

Revision history for this message
Stuart Bishop (stub) wrote :

Dockerfile syntax does not support this. The highest level construct available is limited variable expansion (using environment variables and ARGs passed in), and there is no way to access dynamic data such as the system date or the git revision. You can run arbitrary commands in the container (eg. run the 'date' command), but there is no way for the Dockerfile to make use of the result.

It would be possible for Launchpad to stick the most popular information in environment variables, which the Dockerfile can access. However, there would be no way to transform the data and you would be stick with the date format or 'git describe' choices made by Launchpad.

Allowing a Makefile to be specified instead of a Dockerfile might be a solution.

Processing the Dockerfile using Jinja2 or similar templating engine might be a solution.