0% found this document useful (0 votes)
3 views1 page

Dockerfile for Tomcat, MySQL, and Nginx Setup

The document contains Dockerfile instructions for setting up three different services: a Tomcat server for a web application, a MySQL database with a specified root password and database, and an Nginx server with a custom configuration. Each service is configured to remove default settings and replace them with specified files and environment variables. The Tomcat service exposes port 8080, while the MySQL service initializes with a backup SQL file.

Uploaded by

Gamal Mohammad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Dockerfile for Tomcat, MySQL, and Nginx Setup

The document contains Dockerfile instructions for setting up three different services: a Tomcat server for a web application, a MySQL database with a specified root password and database, and an Nginx server with a custom configuration. Each service is configured to remove default settings and replace them with specified files and environment variables. The Tomcat service exposes port 8080, while the MySQL service initializes with a backup SQL file.

Uploaded by

Gamal Mohammad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

FROM tomcat:8-jre11

RUN rm -rf /usr/local/tomcat/webapps/*


COPY target/[Link] /usr/local/tomcat/webapps/[Link]
EXPOSE 8080
WORKDIR /usr/local/tomcat/
CMD ["[Link]", "run"]

======================

FROM mysql:5.7.25
ENV MYSQL_ROOT_PASSWORD="admin123"
ENV MYSQL_DATABASE="accounts"
ADD db_backup.sql docker-entrypoint-initdb.d/db_backup.sql

======================

FROM nginx
RUN rm -rf /etc/nginx/conf.d/[Link]
COPY [Link] /etc/nginx/conf.d/[Link]

You might also like