0

I am using the following docker-compose.yml to setup my environment

version: "3"
services:
db:
    image: mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: example_db_user
      MYSQL_PASSWORD: example_db_pass
    volumes:
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql
    ports:
       - "3306:3306"
 tomcat:
    image: picoded/tomcat7
    environment:
      JDBC_URL: jdbc:mysql://db:3306/data-core?connectTimeout=0&socketTimeout=0&autoReconnect=true
      JDBC_USER: example_db_user
      JDBC_PASS: example_db_pass
    container_name: tomcat7hope
    ports:
      - "8080:8080"
    volumes:
      - ./docker/data-core.war:/usr/local/tomcat/webapps/data-core.war

    depends_on:
      - db

  maven:
    build:
      context: .
    depends_on:
      - tomcat

My dockerfile is

FROM maven:3.5-jdk-8
RUN mvn clean install

after running the command docker-compose up the maven container exited saying build failure no goals have been specified for this build.But i already specified RUN mvn clean install in my dockerfile so why is it not running properly??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.