All Projects → mdelapenya → docker-tomcat-mysql

mdelapenya / docker-tomcat-mysql

Licence: other
Docker image for tomcat+mysql, orchestrated with supervisord

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to docker-tomcat-mysql

standalone-docker-sailpoint-iiq
A simple way to deploy SailPoint's IdentityIQ into a series of docker containers mimicking the core components of most development environments allowing organizations to get new development team members up on their baseline code in minutes.
Stars: ✭ 33 (+26.92%)
Mutual labels:  tomcat
supervisor-bundle
Easily update your @Supervisor configuration by using annotations in Symfony commands.
Stars: ✭ 35 (+34.62%)
Mutual labels:  supervisord
godofwar
GodOfWar - Malicious Java WAR builder with built-in payloads
Stars: ✭ 118 (+353.85%)
Mutual labels:  tomcat
gretty
Advanced gradle plugin for running web-apps on jetty and tomcat.
Stars: ✭ 116 (+346.15%)
Mutual labels:  tomcat
Tomcat-Webmin-Module
Apache Tomcat Plugin for Webmin
Stars: ✭ 19 (-26.92%)
Mutual labels:  tomcat
inventory-hub-java-on-azure
Sample Inventory Hub App using Serverless and Event-driven Java - on Azure with Spring Boot, Tomcat, Functions, Event Hub and Cosmos DB
Stars: ✭ 18 (-30.77%)
Mutual labels:  tomcat
tomcat-training
Apache Tomcat Training Material
Stars: ✭ 15 (-42.31%)
Mutual labels:  tomcat
WebBug
Java编写的Web漏洞靶场
Stars: ✭ 45 (+73.08%)
Mutual labels:  tomcat
kubernetes-front-end-backend-example
Demonstration on how to setup ingress, two services ( frontend and backend) with reverse proxy
Stars: ✭ 24 (-7.69%)
Mutual labels:  tomcat
smeagol-galore
A git-based wiki featuring markdown, a WYSIWYG Editor, PlantUML, and much more
Stars: ✭ 21 (-19.23%)
Mutual labels:  tomcat
spring-boot-fat-jar-jsp-sample
No description or website provided.
Stars: ✭ 24 (-7.69%)
Mutual labels:  tomcat
docker-iqfeed
Dockerized IQFeed client with X11VNC for remote viewing
Stars: ✭ 28 (+7.69%)
Mutual labels:  supervisord
devops-ninja
This is a collection of some very useful command-line commands that eases the life of a DevOps Engineer.
Stars: ✭ 27 (+3.85%)
Mutual labels:  tomcat
k8s-deployer
Deploy Kubernetes service and store retrieved information in the Consul K/V store
Stars: ✭ 23 (-11.54%)
Mutual labels:  supervisord
Java-CS-Record
记录准备春招实习过程中,学习与复习的知识(模块化整理,非面试题速成)。注:暂停更新,后续请移步博客
Stars: ✭ 73 (+180.77%)
Mutual labels:  tomcat
tomcat role
Ansible role to install Apache Tomcat Java Servlet Container
Stars: ✭ 13 (-50%)
Mutual labels:  tomcat
docker-pega-web-ready
Docker project for generating a tomcat docker image for Pega
Stars: ✭ 46 (+76.92%)
Mutual labels:  tomcat
docker-geoserver
A basic docker geoserver image with JAI and marlin renderer running on tomcat
Stars: ✭ 17 (-34.62%)
Mutual labels:  tomcat
Tomcat7.0.67
学习tomcat(7.0.67)源码
Stars: ✭ 17 (-34.62%)
Mutual labels:  tomcat
ketabhome-shopping-cart-admin-panel
🛒 📙 📔 ketabhome is an online java book store application with admin panel based on servlet, with database c3p0 connector
Stars: ✭ 19 (-26.92%)
Mutual labels:  tomcat

Usage

To create the image mdelapenya/tomcat-mysql, execute the following command on the mdelapenya-docker-tomcat-mysql folder:

docker build -t mdelapenya/tomcat-mysql .

You can now push your new image to the registry:

docker push mdelapenya/tomcat-mysql

Running your tomcat-mysql docker image

Start your image binding the external ports 8080 and 3306 in all interfaces to your container:

docker run -d -p 8080:8080 -p 3306:3306 mdelapenya/tomcat-mysql

Test your deployment:

curl http://localhost:8080/

Tomcat 7.0.77's home page should appear.

Loading your custom Java application

Copy the WAR file representing your application to /opt/apache-tomcat-7.0.77/webapps/ folder:

FROM mdelapenya/tomcat-mysql:7.0.77
COPY yourapp.war /opt/apache-tomcat-7.0.77/webapps/yourapp.war

After that, build the new Dockerfile:

docker build -t username/my-tomcat-mysql-app .

And test it:

docker run -d -p 8080:80 -p 3306:3306 username/my-tomcat-mysql-app

Test your deployment:

curl http://localhost:8080/yourapp

That's it!

Connecting to the bundled MySQL server from within the container

The bundled MySQL server has a root user with no password for local connections. Simply connect from your Java code with this user (using sql2o library):

String jdbcUrl = "jdbc-url-connection";
String jdbcUser = "jdbc-user";
String jdbcPassword = "jdbc-password";

return new Sql2o(jdbcUrl, jdbcUser, jdbcPassword);

## Connecting to the bundled MySQL server from outside the container

The first time that you run the container, a new user admin with all privileges will be created in MySQL with a random password. To get the password, check the logs of the container by running:

docker logs $CONTAINER_ID

You will see an output like the following:

========================================================================
You can now connect to this MySQL Server using:

    mysql -uadmin -p47nnf4FweaKu -h<host> -P<port>

Please remember to change the above password as soon as possible!
MySQL user 'root' has no password but only allows local connections
========================================================================

In this case, 47nnf4FweaKu is the password allocated to the admin user.

You can then connect to MySQL:

mysql -uadmin -p47nnf4FweaKu

Remember that the root user does not allow connections from outside the container - you should use this admin user instead!

## Setting a specific password for the MySQL server admin account

If you want to use a preset password instead of a random generated one, you can set the environment variable MYSQL_PASS to your specific password when running the container:

docker run -d -p 80:80 -p 3306:3306 -e MYSQL_PASS="mypass" mdelapenya/liferay-portal-mysql

You can now test your new admin password:

mysql -uadmin -p"mypass"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].