private String getClassifier(String alias) {
        String packaging = project.getPackaging();
        if ("docker-tar".equalsIgnoreCase(packaging)) {
            return alias;
        } else {
            return "docker" + (alias != null ? "-" + alias : "");
        }
    }
Mode how to attach the source artifact:

<ul>
    <li><strong>first</strong> : The first image with build configuration</li>
    <li><strong>all</strong> : All images with build configuration. Each image must have an alias
       configured which is use as part of the classifier.
    </li>
</ul>
src/main/java/io/fabric8/maven/docker/SourceMojo.java