Sign inSign up

ardhendushekhar/vprofileapp

By ardhendushekhar

•Updated almost 3 years ago

The application layer of the containerized Web App project.

Image
Integration & delivery
0

190

ardhendushekhar/vprofileapp repository overview

⁠VProfile Project Docker Image

⁠Overview

This Docker image is designed to run the VProfile project, a sample Three-tiered Java web application. The image leverages Maven and Tomcat to build and serve the application. The detailed description, usage instructions, and other relevant information below.

⁠Image Details

  • Author: Ardhendu Shekhar
  • Project: Vprofile-Containerization
  • Base Image: openjdk:11 for the build stage and tomcat:9-jre11 for the runtime stage.
  • Application: VProfile Project
  • Java Version: OpenJDK 11
  • Tomcat Version: 9
  • Port Exposed: 8080

⁠Build Process

  1. Stage 1: Build Image

    • The base image openjdk:11 is used.
    • Maven is installed to manage dependencies and build the project.
    • The VProfile project repository is cloned from GitHub.
    • The project is checked out to the docker branch and built using Maven.
  2. Stage 2: Runtime Image

    • The base image tomcat:9-jre11 is used.
    • Default web applications in Tomcat are removed.
    • The built WAR file (vprofile-v2.war) is copied from the build stage and deployed to Tomcat.

⁠Usage

⁠Pulling the Image

To pull the Docker image from DockerHub:

docker pull ardhendushekhar/vprofileapp:latest
⁠Running the Container

To run the Docker container:

docker run -d -p 8080:8080 ardhendushekhar/vprofileapp:latest

This command will start a container with the VProfile application accessible at http://localhost:8080.

⁠Docker Compose

For a more complex setup or multi-container environments, you can use Docker Compose. Below is an example docker-compose.yml:

version: '3'
services:
  vprofile:
    image: ardhendushekhar/vprofileapp:latest
    ports:
      - "8080:8080"

Run this with after making appropriate changes:

docker-compose up -d

⁠Building the Image Locally

If you want to build the Docker image locally:

  1. Clone the repository:

    git clone https://github.com/devopshydclub/vprofile-project.git
    cd vprofile-project
    
  2. Build the Docker image:

    docker build -t ardhendushekhar/vprofileapp:latest .
    
  3. Run the Docker container:

    docker run -d -p 8080:8080 ardhendushekhar/vprofileapp:latest
    

⁠Environment Variables

The container can be customized with the following environment variables:

  • JAVA_OPTS: Custom Java options to run the Tomcat server.
  • CATALINA_OPTS: Custom options for Tomcat.

⁠Contributing

If you wish to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Create a new Pull Request.

This Docker image simplifies the deployment process of the VProfile project, ensuring a consistent environment and reducing setup time. Enjoy developing and deploying your Java web applications with ease!

Tag summary

Content type

Image

Digest

sha256:4ddd000fd…

Size

146.6 MB

Last updated

almost 3 years ago

docker pull ardhendushekhar/vprofileapp