简体   繁体   中英

How pass -t parameter to fabric8 docker-maven-plugin?

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 . ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM