patrickhoefler/dockerfilegraph

Resolving image version when it is defined as argument

Ferror opened this issue · 2 comments

Introduction

Hi! Big kudos for creating this tool. I would like to suggest a feature. It is popular in my area that we specify versions of images as arguments. So they can be easily changeable. What is seen is that dockerfilegraph does not resolve them and for graphs, I would expect them to be resolved. I am not aware of how the tool works itself, but maybe we could analyze the Dockerfile after the first compilation? After the arguments are resolved. Please let me know what you all think about it.

Chart

Screenshot 2022-11-06 at 16 50 24

Dockerfile

ARG PHP_VERSION=8.0
ARG ALPINE_VERSION=3.15
ARG COMPOSER_VERSION=2
ARG PHP_EXTENSION_INSTALLER_VERSION=latest

FROM composer:${COMPOSER_VERSION} AS composer
FROM mlocati/php-extension-installer:${PHP_EXTENSION_INSTALLER_VERSION} AS php_extension_installer

FROM php:${PHP_VERSION}-fpm-alpine${ALPINE_VERSION} AS base

Hey @Ferror, I just released v0.10.0 which includes the functionality you were missing.

Please let me know if it works for you as expected 🙂

@patrickhoefler wow. Just wow :)