Skip to content

Volume is not deleted #434

Open
Open
@hammer-abcfitness

Description

@hammer-abcfitness

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions