/docker-for-development-example-application

This is an example application to showcase Docker use-cases for development.

Primary LanguageJava

Docker For Development Example Application

Requirements

Install Java:

Follow the described Guide https://www.oracle.com/java/technologies/downloads/ or just use some package manager of your choice like brew:

brew install java

Install Docker

https://docs.docker.com/get-docker/

Useful Commands

Run Integration Tests Using a Dockerized MySQL Database

./mvnw clean test

Build a Local Application Docker Container

./mvnw compile jib:dockerBuild

Start A MySQL Database

docker run --rm -v "$PWD/data":/var/lib/mysql --name mysql -e MYSQL_ROOT_PASSWORD=admin-password -e MYSQL_DATABASE=my-database -p 3306:3306 mysql:8.0.28-debian

Start The Dockerized Application

docker run --net=host my-docker-image