1

Here is plugin definition:

    <plugin>
        <groupId>io.fabric8</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <version>0.26.0</version>
        <configuration>
            <registry>000000000000.dkr.ecr.us-east-1.amazonaws.com/my-aws-registy-0000000000000:latest</registry>
            <images>
                <image>
                    <name>my-image</name>
                    <build>
                        <tags>
                            <tag>000000000000.dkr.ecr.us-east-1.amazonaws.com/my-aws-registy-0000000000000:latest</tag>
                        </tags>
                        <dockerFileDir>${project.build.directory}</dockerFileDir>
                    </build>
                </image>
            </images>
        </configuration>
    </plugin>

When I invoke cmd command:

sudo docker build -t 000000000000.dkr.ecr.us-east-1.amazonaws.com/my-aws-registy-0000000000000:latest .

Everythings works perfect. But when docker:build goal started from plugin I got:

 tag part '000000000000.dkr.ecr.us-east-1.amazonaws.com/my-aws-registy-0000000000000:latest' doesn't match allowed pattern '^[\w][\w.-]{0,127}$'

Why? What is the working configuration analog in fabric8 docker-maven-plugin for docker build -t .?

Cherry
  • 31,309
  • 66
  • 224
  • 364

1 Answers1

0

Use <name>image-name:tag-name</name> format inside image configuration.

Tag config inside build is the build time configuration. You will be able to use that tag only after you have locally built the image.

arunkjn
  • 5,631
  • 5
  • 21
  • 31