- Install Java 8.
- Modify the
url
andcertPath
properties in thedocker
section of thebuild.gradle
file to point to your Docker machine. - Build the image with:
./gradlew clean buildDockerImage
- If you want to override the version of the image built, use:
./gradlew -Pversion=_VERSION_ clean buildDockerImage
- Run the Docker image built in the previous step by executing:
docker run -dP --name rest-o-rant-api dkr-reg:5000/rest-o-rant-api:v1
- Check the port at which port 80 is exposed by running
docker ps
. - Open
http://<DOCKER>:<PORT>/
. - See the restaurant main page.
- Click the Search button.
- Add a file setenv.sh to tomcat/bin directory and append the following - JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=withDb”
- Add the jndi-lookup config to conf/context.xml of tomcat server.
None of the configurations mentioned above are necessary.