How can we create a simple docker file that can run mysql database and execute scripts present in some folder
like scripts-folder,
then run python application which will use this mysql database internally.
Currently, I have a Dockerfile to create mysql docker image and run scripts on it, but i don't want to create a seperate docker image for database work.
# Derived from official mysql image (our base image)
FROM mysql
# Add a database
ENV MYSQL_DATABASE mydatabase
# Add the content of the sql-scripts/ directory to your image
# All scripts in docker-entrypoint-initdb.d/ are automatically
# executed during container startup
COPY ./sql-scripts/ /docker-entrypoint-initdb.d/
But, I need to have only 1 ubuntu docker image that should run both mysql and python application internally.