Open HofmeisterAn opened 1 year ago
Resolving variables (ARG
s) should be done here (the matched lines contains already an ):arg
Regex group
I am missing the parsing of "ARG" as well. I use Testcontainers to smoke test a rather complicated Dockerfile which is configured by builds-args/ ARGS. At the moment I manually maintain a second Dockerfile just for the Testcontainers E2E test.
Problem
Testcontainers for .NET cannot resolve variables (
ARG
s) during the Docker image build process. Currently, Testcontainers does not pull base images in advance that utilize variables. Hence, if the images are not already present on the host, they will not be pulled, causing the Docker image build process to fail.Solution
To pull base images that utilize variables in advance too, Testcontainers needs to have the capability to resolve the default values and build arguments of variables.
Benefit
Developers will not be required to manually pull the images beforehand, enabling a more streamlined Docker image building and testing configuration.
Alternatives
Pull images manually beforehand.
Would you like to help contributing this enhancement?
Yes