I' m trying to run an entrypoint script which wait until the mysql database is ready like these two examples : example 1 and example 2
and as expected it fails with message "mysql not found" thus in the Dockerfile i added these two lines :
RUN apt-get update
RUN apt-get install mysql-client
but i'm getting a message that say : Package 'mysql-client' has no installation candidate
so i tried with default-mysql-client but getting another error: ERROR: Service 'api' failed to build: The command '/bin/sh -c apt-get install default-mysql-client' returned a non-zero code: 1
then i tried with mariadb-client but still getting the same error : ERROR: Service 'api' failed to build: The command '/bin/sh -c apt-get install default-mysql-client' returned a non-zero code: 1
this is my Dockerfile
FROM tomcat:10.0.0-M7-jdk11-openjdk-buster
COPY . /tmp
RUN cp /tmp/API.war /usr/local/tomcat/webapps
WORKDIR /tmp
RUN apt-get update
RUN apt-get install default-mysql-client
someone has an idea ?