Skip to content

Commit

Permalink
Add IT test
Browse files Browse the repository at this point in the history
When setting autoRemove to true (https://docs.docker.com/reference/cli/docker/container/run/#rm), the container wil be removed by the Docker daemon after stopping it.
This lets the stop goal fail (up until v0.44.0).
  • Loading branch information
sebastiankirsch authored and rohanKanojia committed Jun 16, 2024
1 parent f4de3af commit ac5e09a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
51 changes: 51 additions & 0 deletions it/graceful-container-removal/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.fabric8.dmp.itests</groupId>
<artifactId>dmp-it-parent</artifactId>
<version>0.45-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>fabric8io</groupId>
<artifactId>dmp-it-graceful-container-removal</artifactId>
<packaging>pom</packaging>

<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>busybox</name>
<run>
<autoRemove>true</autoRemove>
<wait>
<shutdown>128</shutdown>
</wait>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>start-docker</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-docker</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
1 change: 1 addition & 0 deletions it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<module>dockerfile-base-as-arg</module>
<module>dockerfile-base-as-arg-buildconfig</module>
<module>dockerignore</module>
<module>graceful-container-removal</module>
<module>healthcheck</module>
<module>helloworld</module>
<module>log</module>
Expand Down

0 comments on commit ac5e09a

Please sign in to comment.