{"id":23744721,"url":"https://github.com/iammahesh123/spring-dockerization-demo","last_synced_at":"2026-05-05T04:03:12.873Z","repository":{"id":231060189,"uuid":"780797982","full_name":"iammahesh123/spring-dockerization-demo","owner":"iammahesh123","description":"This demo showcases the process of containerizing a Spring Boot application using Docker, allowing for easy deployment and scaling in various environments.","archived":false,"fork":false,"pushed_at":"2024-04-02T07:43:16.000Z","size":576,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-18T17:38:38.818Z","etag":null,"topics":["docker-container","docker-image","dockerfile","spring-boot","tomcat-server"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iammahesh123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-02T07:17:50.000Z","updated_at":"2024-04-02T07:43:40.000Z","dependencies_parsed_at":"2024-04-02T08:48:06.698Z","dependency_job_id":null,"html_url":"https://github.com/iammahesh123/spring-dockerization-demo","commit_stats":null,"previous_names":["iammahesh123/spring-dockerization-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iammahesh123/spring-dockerization-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammahesh123%2Fspring-dockerization-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammahesh123%2Fspring-dockerization-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammahesh123%2Fspring-dockerization-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammahesh123%2Fspring-dockerization-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iammahesh123","download_url":"https://codeload.github.com/iammahesh123/spring-dockerization-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammahesh123%2Fspring-dockerization-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32634732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-container","docker-image","dockerfile","spring-boot","tomcat-server"],"created_at":"2024-12-31T12:39:34.824Z","updated_at":"2026-05-05T04:03:12.852Z","avatar_url":"https://github.com/iammahesh123.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Application Docker Demo\nWelcome to the Spring Boot Application Docker Demo! This repository contains a simple Spring Boot application that demonstrates how to dockerize and deploy a Spring Boot application in a Docker container.\n## Overview\nThis demo showcases the process of containerizing a Spring Boot application using Docker, allowing for easy deployment and scaling in various environments. By following the steps outlined in this README,\nyou'll learn how to package your Spring Boot application into a Docker image and run it as a container.\n\n## Prerequisites\nBefore you begin, ensure you have met the following requirements:\n- Java Development Kit (JDK) installed on your local machine\n- Docker installed on your local machine\n### Getting Started\nTo get started, follow these steps:\n\n1. __Clone the Repository__: Clone this repository to your local machine using the following command:\n```bash\ngit clone https://github.com/iammahesh123/spring-dockerization-demo.git\n```\n2. __Navigate to the Project Directory__: Move into the cloned repository directory:\n```bash\ncd spring-dockerization-demo\n```\n3. __Build the Spring Boot Application__: Use Maven to build the Spring Boot application by running the following command:\n\n``` bash\n./mvnw clean package\n```\n4. __Build the Docker Image__: Build a Docker image for the Spring Boot application using the provided Dockerfile:\n``` bash\ndocker build -t my-spring-app .\n```\n5. __Run the Docker Container__: Launch a Docker container from the built Docker image:\n\n``` bash\ndocker run -p 9090:8080 my-spring-app\n```\n6.__Access the Application__: Open a web browser and navigate to `http://localhost:8081` to access the running Spring Boot application.\n\n```bash\nhttp://localhost:9090\n```\n\n## Dockerfile Explanation\nHere's the Dockerfile used to build the Docker image:\n``` bash\n# Use a base image with Java installed\nFROM openjdk:17-jdk-alpine\n\n# Set the working directory in the container\nWORKDIR /app\n\n# Copy the compiled Spring application JAR file into the container\nCOPY target/spring-demo.jar /app/spring-demo.jar\n\n# Expose the port your application runs on\nEXPOSE 8081\n\n# Command to run your application\nENTRYPOINT [\"java\", \"-jar\", \"spring-demo.jar\"]\n```\n- __FROM openjdk:11-jre-slim__: Specifies the base Docker image containing OpenJDK 11.\n- __WORKDIR /app__: Sets the working directory within the Docker container to /app.\n- __COPY target/spring-demo.jar /app/spring-demo.jar__: Copies the compiled Spring Boot application JAR file into the Docker container.\n- __EXPOSE 8081__: Exposes port 8081 within the Docker container.\n- __ENTRYPOINT [\"java\", \"-jar\", \"spring-demo.jar\"]__: Defines the command to run when the Docker container starts, which executes the Spring Boot application JAR file.\n\n## Screenshots\n### Build the image\n![Build the docker image](https://github.com/iammahesh123/spring-dockerization-demo/blob/master/dockerbuild.png)\n### Docker Destop Dashboard\n![Docker](https://github.com/iammahesh123/spring-dockerization-demo/blob/master/Screenshot%202024-04-02%20122604.png)\n### Run the Image\n![Run](https://github.com/iammahesh123/spring-dockerization-demo/blob/master/Screenshot%202024-04-02%20124452.png)\n## Contributing\nContributions are welcome! Please feel free to fork the repository and submit pull requests.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\nInspired by __Spring Boot__\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiammahesh123%2Fspring-dockerization-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiammahesh123%2Fspring-dockerization-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiammahesh123%2Fspring-dockerization-demo/lists"}