1
1
# Dockerize java mysql example project
2
2
3
- ![ preview image] ( https://github. com/mixaverros88/docker_with_java_and_mysql/blob /master/icons/docker_overview.JPG )
3
+ ![ preview image] ( https://raw.githubusercontent. com/mixaverros88/docker-with-java-and-mysql /master/icons/docker_overview.JPG )
4
4
This simple example combines 2 docker files or docker-compose file, one to spin up a mysql container and the other a java container.
5
5
6
6
These docker files are located in the corresponding folders (mysql, java). Also contains a docker-compose file in the root folder.
@@ -9,7 +9,7 @@ Also you can find a network folder, which contains an sh file to create a networ
9
9
***
10
10
### Start the mysql container
11
11
12
- ![ preview image] ( https://github. com/mixaverros88/docker_with_java_and_mysql/blob /master/icons/MySQL-512.png )
12
+ ![ preview image] ( https://raw.githubusercontent. com/mixaverros88/docker-with-java-and-mysql /master/icons/MySQL-512.png )
13
13
You can find the mysql dockerfile in the mysql folder. There you can run the build.sh file in order to build the docker image or you can run the following command.
14
14
```
15
15
docker build -t my-mysql .
@@ -65,7 +65,7 @@ The process is correct.
65
65
66
66
### Start the java container
67
67
68
- ![ preview image] ( https://github. com/mixaverros88/docker_with_java_and_mysql/blob /master/icons/javaIco.png )
68
+ ![ preview image] ( https://raw.githubusercontent. com/mixaverros88/docker-with-java-and-mysql /master/icons/javaIco.png )
69
69
You can find the java dockerfile in the java folder. There you can run the build.sh file in order to build the docker image or you can run the following command.
70
70
```
71
71
docker build -t java-connect-with-mysql .
@@ -105,7 +105,7 @@ docker network connect isolated java-connect-with-mysql
105
105
```
106
106
***
107
107
### Create secrets
108
- ![ preview image] ( https://github. com/mixaverros88/docker_with_java_and_mysql/blob /master/icons/dockerIcon.png )
108
+ ![ preview image] ( https://raw.githubusercontent. com/mixaverros88/docker-with-java-and-mysql /master/icons/dockerIcon.png )
109
109
```
110
110
echo "my-db-pass" | docker secret create mysql_root_pass -
111
111
```
@@ -123,4 +123,4 @@ Use the maven plug-in (tomcat7-maven-plugin) for tomcat server in order to autom
123
123
You can run the below command in order to deploy the artifact in your local tomcat server
124
124
```
125
125
mvn clean tomcat7:deploy
126
- ```
126
+ ```
0 commit comments