Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose rm <service1> <service2> #10

Open
Girivasan opened this issue Jan 6, 2021 · 1 comment
Open

docker-compose rm <service1> <service2> #10

Girivasan opened this issue Jan 6, 2021 · 1 comment

Comments

@Girivasan
Copy link

Girivasan commented Jan 6, 2021

First of all, really appreciate the effort you put here and this plugin is very useful.

I want to create containers each and every time. Sometimes containers with the same name present, and is throwing errors with the plugin when containers are starting with up goal. Could you add support for this ?

docker-compose rm

@Girivasan Girivasan changed the title docker-compose up --force-recreate docker-compose rm <service1> <service2> Jan 6, 2021
@mjagus
Copy link
Member

mjagus commented Feb 12, 2021

Hi Girivasan,

Would introducing additional down goal execution in pre-integration-test phase fix your use-case? This would remove all dangling containers before docker-compose up gets called.
Basically your executions block for the plugin would look something like:

<executions>
    <execution>
        <id>clean-before-up</id>
        <phase>pre-integration-test</phase>
        <goals>
            <goal>down</goal>
        </goals>
    </execution>
    <execution>
        <id>up</id>
        <phase>pre-integration-test</phase>
        <goals>
            <goal>up</goal>
        </goals>
    </execution>
    <execution>
        <id>down</id>
        <phase>post-integration-test</phase>
        <goals>
            <goal>down</goal>
        </goals>
    </execution>
</executions>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants