I am new to dockers and continuously trying to learn it. I am getting the mysql-standalone_1 | nc command is missing! and I am unable to get how to resolve it. The scenario is my app should wait for MySQL to start getting connections and before that MySQL should wait for Eureka-server to start completely. I am using wait-for.sh script to control the startup of microservices. This is my docker file
version: "3" services: mysql-standalone: image: mysql:8.0.25 environment: - MYSQL_ROOT_PASSWORD=root123M. - MYSQL_DATABASE=usermanagementappdp ports: - 3306:3306 depends_on: ['eureka-server'] volumes: - ./wait-for:/docker-entrypoint-initdb.d entrypoint: ["/docker-entrypoint-initdb.d/wait-for.sh", "eureka-server:8761", "--", "docker-entrypoint.sh"] phpmyadmin: image: phpmyadmin/phpmyadmin:latest restart: always environment: PMA_HOST: mysql-standalone PMA_USER: root PMA_PASSWORD: abcd ports: - 8085:80 eureka-server: image: eureka-server ports: - 8761:8761 build: context: "../Eureka-Server-For-User-Management-App" dockerfile: "Dockerfile" usermanagementapp-docker: image: usermanagementapp-docker:latest ports: - 8089:8089 links: - eureka-server environment: EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka-server:8761/eureka SPRING_DATASOURCE_URL: jdbc:mysql://mysql-standalone:3306/usermanagementappdp?allowPublicKeyRetrieval=true&autoReconnect=true&useSSL=false build: context: "./" dockerfile: "Dockerfile" #entrypoint: ["/wait-for.sh", "mysql-standalone:3306", "--", "['java','-jar','/app.jar']"] depends_on: ['mysql-standalone','eureka-server']
Have tried finding on the internet for the solution but have not found any. Please let me know if any other inputs are required from my side. Thanks in advance.
command: ["RUN apt-get -q update && apt-get -qy install netcat"]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)