fabric8io / docker-maven-plugin

Maven plugin for running and creating Docker images
https://dmp.fabric8.io
Apache License 2.0
1.88k stars 643 forks source link

waiting for log entry kills wildfly #1088

Open nickarls opened 6 years ago

nickarls commented 6 years ago

I can use the wait/time for watching a WildFly container startup but if I wait for a log entry the container dies saying it recieved a shutdown signal from the OS

                    <image>
                        <name>jboss/wildfly</name>
                        <run>
                            <wait>
                                <log>WFLYSRV0025</log>
                            </wait>
                        </run>
                    </image>
nickarls commented 6 years ago

adding -Xrs to JVM parameters doesn't help

rhuss commented 6 years ago

@nickarls would you mind to add a fully working example which shows this behaviour ? 'would love to reproduce it.

nickarls commented 6 years ago
<project xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>foo</groupId>
        <artifactId>bar</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <packaging>jar</packaging>

        <build>
                <plugins>
                        <plugin>
                                <groupId>io.fabric8</groupId>
                                <artifactId>docker-maven-plugin</artifactId>
                                <version>0.26.1</version>
                                <configuration>
                                        <dockerHost>http://172.17.0.1:2375</dockerHost>
                                        <startParallel>true</startParallel>
                                        <images>
                                                <image>
                                                        <name>jboss/wildfly</name>
                                                        <run>
                                                                <wait>
                                                                        <log>WFLYSRV0025</log>
                                                                </wait>
                                                        </run>
                                                </image>
                                        </images>
                                </configuration>
                        </plugin>
                </plugins>
        </build>

</project>
docker run -it --rm -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn docker:run

adjust dockerHost

Hmm. Wonder why quoting XML doesn't work?

rhuss commented 6 years ago

Hmm. Wonder why quoting XML doesn't work?

it does, it just uses a different syntax ;-) I updated your comment if you don't mind.

rhuss commented 6 years ago

I hope I can jump on this example soonish ...