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

Volume is not deleted #434

Open
hammer-abcfitness opened this issue Dec 28, 2023 · 0 comments
Open

Volume is not deleted #434

hammer-abcfitness opened this issue Dec 28, 2023 · 0 comments

Comments

@hammer-abcfitness
Copy link

Using this with mysql/maria:

plugins {
        id 'com.avast.gradle.docker-compose' version '0.17.6'
}

dockerCompose.isRequiredBy(test)

dockerCompose {
    startedServices = ['db']
}

With a compose file with mariadb

version: '3.3'
services:
  db:
    platform: linux/x86_64
    image: mariadb:10.5.8
    profiles: ["all", "dev"]
    container_name: footest-service-database-os
    restart: always
    environment:
      MYSQL_DATABASE: 'fooStuff_db'
      # So you don't have to use root, but you can if you like
      MYSQL_USER: 'user'
      # You can use whatever password you like
      MYSQL_PASSWORD: 'password'
      # Password for root access
      MYSQL_ROOT_PASSWORD: 'password'
    ports:
      # This maps your mysql instance to port 3306 on your local machine.
      # You may need to change this if you have the port in use.
      # <Port exposed> : <MySQL Port running inside container>
      - '3306:3306'
    expose:
      # Opens port 3306 on the container
      - '3306'
      # Where our data will be persisted
    volumes:
      - my-db:/var/lib/mysql

# Names our volume
volumes:
  my-db:

The containers are deleted, however, the volume is not.

This may be the same issue as #369

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

1 participant