Comments (8)
That's interesting. In case of the error, if you retry to delete the container sometimes later, does it the work ?
I ask because I could imagine to simply retry the removal if the first try fails (instead of inserting a pause from the very beginning since that problem never happened to me until now).
Another question: Did you really slept 20 minutes (1000 seconds) or this a typo in your command above (and you meant 1000 ms) ?
from docker-maven-plugin.
It should have been a sleep 1, not the 1000 for command line. I used 1000 (ms) for an update to the AbstractDockerMojo.java.
Attempting to remove the container after getting the error results in another error indicating the container was not found. Restarting the docker engine showed the same container ID, but a different name associated. Executing docker rm ImgID succeeds and removes the container(s).
I added a Thread.sleep(1000) just before the access.removeContainer in the AbstractDockerMojo as
if (!keepContainer) {
try {
Thread.sleep(1000); //need to give the docker engine the split second to finish
} catch (InterruptedException e) {
//just eat it, eat it...
}
// Remove the container
access.removeContainer(container);
}
And this successfully completes my integration tests from starting all my containers to stopping and removing them all.
from docker-maven-plugin.
Ok, this seems that docker has indeed multiple issues when removing images (search for docker run rm busy). So its probably a good idea to add this pause as a workaround (wonder if it could be 500ms as well ;-)
'will add this for the next release, maybe even configurable (in the <wait>
section).
from docker-maven-plugin.
I believe 500 ms will work. It seems that it just has to have a pause of some kind to complete the previous command.
from docker-maven-plugin.
Just pust a new snapshot 0.10.6-SNAPSHOT which allow the specificaton on a grace period after stopping a container. See #70 for details how to configure this.
Does this fix your issue ?
from docker-maven-plugin.
Is the change adding an additional tag to the already existing wait? Such as
<wait>
<log>Server started in</log>
<!--... but a max of 20 seconds-->
<time>20000</time>
<!-- Wait 500 ms between stopping and removing the container -->
<shutdown>500</shutdown>
</wait>
from docker-maven-plugin.
Yes, that's it.
from docker-maven-plugin.
I can confirm that the new shutdown works. I was able to launch, test, shutdown and remove my containers.
from docker-maven-plugin.
Related Issues (20)
- Can't figure out how to set the image tag HOT 3
- How to actually get verbose output from docker:build? HOT 8
- Quickstarts : Update Spring Boot With Jib Quickstart Spring Version to latest 2.x version HOT 1
- Build fails with podman and extra labels
- RegistryServiceTest : remove unused variable `hasImage` and `dockerFileUtilMockedStatic` HOT 3
- LogRequestor : Replace `com.google.common.base.Charsets.UTF_8` with `StandardCharsets.UTF_8` HOT 5
- Turning on JIB mode breaks multi-assembly images HOT 2
- <run><wait> no longer working correctly
- Cannot find default setter in class io.fabric8.maven.docker.config.ImageConfiguration while trying to execute docker:start goal HOT 1
- Can't use <packaging>docker</packaging> in a multi-module project HOT 1
- Version 0.44.0 fails to use the `<args>` configuration to populate the Docker build-args HOT 5
- support Dockerfile RUN <<EOF HOT 1
- docker:push failed with ARG in FROM HOT 5
- DockerComposeServiceWrapper : Use `isEmpty()` to check collection is empty HOT 3
- WatchService : Anonymous `new Runnable()` can be replaced with lambda HOT 5
- Quickstarts : Improve `it/spring-boot-with-jib` integration test HOT 2
- Ability to
- Error Encountered When Building Multi-Architecture Docker Images Using docker-maven-plugin HOT 1
- Write portPropertyFile as soon as the container is started
- Unable to push docker images to Nexus using "docker-maven-plugin" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-maven-plugin.