FROM images in Dockerfiles specified by relative paths are not pulled when building (original) (raw)
Description
If you point to your Dockerfile using a relative path, then any FROM images in your Dockerfile will not be pulled when using the docker:build goal.
The documentation for docker:build states:
All paths can be either absolute or relative paths (except when both dockerFileDir and dockerFile are provided in which case dockerFile must not be absolute). A relative path is looked up in project.basedir/src/main/dockerbydefault.Youcanmakeiteasilyanabsolutepathbyusing{project.basedir}/src/main/docker by default. You can make it easily an absolute path by using project.basedir/src/main/dockerbydefault.Youcanmakeiteasilyanabsolutepathbyusing{project.basedir} in your configuration.
My image's build configuration has not changed from version 0.43.4, but the FROM images in my Dockerfile are no longer pulled. Dockerfile and files.xml are both in the src/main/docker folder of my module.
<build>
<dockerFile>Dockerfile</dockerFile>
<assembly>
<descriptor>files.xml</descriptor>
</assembly>
</build>
This regression was introduced in e980189. I tested with 0.44.0 and could not reproduce the issue.
Info
- docker-maven-plugin version : 0.45.0
- Maven version (
mvn -v) :
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /Applications/apache-maven-3.9.9
Java version: 17.0.12, vendor: Amazon.com Inc., runtime: /Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "13.7", arch: "aarch64", family: "mac"
- Docker version :
Docker version 27.2.0, build 3ab4256