Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

erro ao executar o docker-compose up "unsupported config option for services.volumes...."

meus arquivos: docker-compose.yml version: "3"

services:
    bitcoin-jvm:
        image: quarkus/bitcoin-jvm:latest
        build:
            context: ./
            dockerfile: src/main/docker/Dockerfile.${QUARKUS_MODE:-jvm}
        environment:
            QUARKUS_DATASOURCE_URL: jdbc:mysql://mysql-bitcoin:3306/bitcoin_negotiation?autoReconnect=true
        networks:
            - mysqldb
        ports:
            - 8080:8080
        depends_on:
            - mysql-bitcoin

    mysql-bitcoin:
        image: aluracursos/mysql-quarkus-db:latest
        environment:
            - MYSQL_ROOT_PASSWORD=root
            - MYSQL_PASSWORD=root
        volumes:
            - mysql.bitcoin:/var/lib/mysql
        ports:
            - 3307:3306
        networks:
            - mysqldb

    networks:
        mysqldb:
            driver: bridge

    volumes:
        mysql.bitcoin:

ao executar o comando na raiz do meu projeto, ex: mvn clear install -DskipTests && docker-compose up

ocorre erro no terminal abaixo:

[INFO] Installing /home/capone/tools/eclipse2020-12-r/eclipse/workspace/bitcoin/target/bitcoin-1.0.0-SNAPSHOT.jar to /home/capone/.m2/repository/org/capone/bitcoin/1.0.0-SNAPSHOT/bitcoin-1.0.0-SNAPSHOT.jar [INFO] Installing /home/capone/tools/eclipse2020-12-r/eclipse/workspace/bitcoin/pom.xml to /home/capone/.m2/repository/org/capone/bitcoin/1.0.0-SNAPSHOT/bitcoin-1.0.0-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.249 s [INFO] Finished at: 2021-02-08T23:45:43-03:00 [INFO] ------------------------------------------------------------------------ ERROR: The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services.networks: 'mysql-db' Unsupported config option for services.volumes: 'mysql.bitcoin'

agradeço desde ja a ajuda!

2 respostas
solução!

achei o erro, volumes node e network node estavam dentro de services node, e o correto é ficar fora.

Perfeito, Ramon. Obrigado por comentar a solução.