With docker compose file version 3 I can't seem to figure out how to create a data only container for my mariadb container.
Can anyone please suggest how to do it? Here is my current compose file:
mariadb: image: mariadb:dev restart: always environment: MYSQL_ALLOW_EMPTY_PASSWORD: 1 MYSQL_DATABASE: db MYSQL_USER: db_user MYSQL_PASSWORD: 1234 build: context: mariadb volumes: - ./mariadb/db_data:/var/lib/mysql - ./mariadb/tools:/app/tools container_name: mariadb command: /app/tools/mariadb-start.sh mysqld
Basically, I would like to replace /mariadb/db_data mounted from host volume with a data only container that is used by my mariadb container.