Preparing a Dockerfile

To build a Docker image, we need to create a file called Dockerfile to specify the environment inside the Docker container. Our application will be securely isolated inside the container. If you're not familiar with Docker, the official documentation at https://docs.docker.com is a great place to start your exploration.

Before we start, we need to make sure that Docker is installed in our local environment so that we can test Dockerfile locally. In case you haven't installed it, you can download it from https://www.docker.com/get-started and follow the install instructions.

We will create a folder called docker in the root folder with the following structure:

├── docker    ├── Dockerfile ├── application-docker.properties ...

Get Building Applications with Spring 5 and Vue.js 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.