From the course: Extending, Securing, and Dockerizing Spring Boot Microservices

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Create and run a Java application Docker image

Create and run a Java application Docker image

From the course: Extending, Securing, and Dockerizing Spring Boot Microservices

Start my 1-month free trial

Create and run a Java application Docker image

- [Instructor] Now we're going to Dockerize the Explore California application itself. We will create a Docker image that includes a Linux operating system, Java JDK version 8 and the explorecali jar. In this video, we will run the default profile which interacts with the H2 Database so a container of this image can run completely standalone. First, let's make sure that our jar for the explorecali application has been built. So, that built our jar, let's actually make sure in the target folder. And that's our jar there and now we have a Docker file that was created in the folder. Let's look at that. So, this is sort of the configuration for the setting up of the Docker image, so the starting point is we already have a Linux operating system. From that we're gonna use the Java 8 image, our WORKDIR is slash, then we're going to add our jar to the image and we're going to expose port 8080 and that entry point is sort of the equivalent of a command line, so we're actually going to run…

Contents