If you need to use commands not supported by the POM configuration (such as VOLUME) or prefer a standard Dockerfile, use the dockerDirectory element.
Note: When dockerDirectory is specified, the baseImage, maintainer, cmd, and entryPoint elements in the POM are ignored. The contents of the specified directory will be copied into ${project.build.directory}/docker to serve as the build context.
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>VERSION GOES HERE</version>
<configuration>
<imageName>example</imageName>
<dockerDirectory>docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>