-
Notifications
You must be signed in to change notification settings - Fork 202
Specifying external Dockerfile broken #1097
Comments
Hi @ro14nd @nicolaferraro can you please guide how we can fix above issue? |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
This bug still exists on f-m-p 3.5.42 |
When using an external Dockerfile, you get a default BusyBox image unless you specify dockerFileDir;
It would be better if it failed right away than give an unwanted/incorrect default busybox image too. |
I guess what the user might be looking for here, is the simple dockerfile build (https://maven.fabric8.io/#simple-dockerfile-build ) where they specify the dockerfile on projects' base directory location and nothing in XML config.,, This feature also has a problem since the Dockerfile isn't being picked up in the simple dockerfile build mode, I have created an issue for that.. Closing this issue in favour of #1814 |
Description
Specifying an external dockerfile for springboot based project doesn't work as expected and as mentioned in the documentation.
Placing the
Dockerfile
in default location i.e.src/main/docker
, doesn't have any effect on the build and fmp continues to use the default dockerfile instead of the external one.By specifying the
dockerFileDir
as./
, fmp was able to read the dockerfile../
refers to the exact same locationsrc/main/docker
which should have been set by default.As mentioned in the documentation, the default location for assembly is
maven/
, but copying from this location in the dockerfile fails with the errorNo such file or directory found
. Where as the default dockerfile used by fmp copy's from the same locationmaven/
and does not fail.Info
mvn -v
) : 3.3.9Steps to reproduce:
Dockerfile
identical to the one fmp uses by default, just change the base image (what I intended to do)Dockerfile
insrc/main/docker
, fmp won't pick it up.pom.xml
fmp will now pick it up and build using this dockerfile, But FAIL at the
COPY maven /deployments/
step, as it would be unable to find themaven
directory.Workaround:
By @jstrachan
create a custom base image separately then just reference it like this https://github.com/fabric8io/generator-backend/blob/master/pom.xml#L39
The text was updated successfully, but these errors were encountered: