Demo project with demonstration of dockerizing Spring Boot App and MySQL.
- Install docker on your local machine. You can find the installation steps on this link: https://docs.docker.com/install/
- Open terminal and navigate to project directory
- Run command:
mvn clean install -DskipTests
- Run command:
mvn clean package -DskipTest
- Run command to build images:
docker-compose build
- Run command to deploy stack locally:
docker stack deploy -c docker-compose.yml <your_stack_name>
- Run command
docker ps
to see running containers.
- Run command:
docker ps
- Run command:
docker logs -f <container_id>
NOTE: The above steps will create docker stack with MySQL and Java running containers.
Heril Muratović
Software Engineer
Mobile: +38269657962
E-mail: hedzaprog@gmail.com
Skype: hedza06
Twitter: hedzakirk
LinkedIn: https://www.linkedin.com/in/heril-muratovi%C4%87-021097132/
StackOverflow: https://stackoverflow.com/users/4078505/heril-muratovic