{"id":18865831,"url":"https://github.com/bitxon/java-spring-containerization","last_synced_at":"2026-02-12T14:30:17.302Z","repository":{"id":156112657,"uuid":"619897961","full_name":"bitxon/java-spring-containerization","owner":"bitxon","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-27T09:27:56.000Z","size":188,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T22:13:17.411Z","etag":null,"topics":["buildpack","docker","dockerfile","java","jib","spring"],"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/bitxon.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,"publiccode":null,"codemeta":null}},"created_at":"2023-03-27T16:20:47.000Z","updated_at":"2024-01-30T10:44:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"7400161f-6e67-4795-b0b5-6ff19d09ef47","html_url":"https://github.com/bitxon/java-spring-containerization","commit_stats":null,"previous_names":["bitxon/java-spring-containerization"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitxon%2Fjava-spring-containerization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitxon%2Fjava-spring-containerization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitxon%2Fjava-spring-containerization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitxon%2Fjava-spring-containerization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitxon","download_url":"https://codeload.github.com/bitxon/java-spring-containerization/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239809874,"owners_count":19700701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["buildpack","docker","dockerfile","java","jib","spring"],"created_at":"2024-11-08T05:04:44.992Z","updated_at":"2026-02-12T14:30:17.270Z","avatar_url":"https://github.com/bitxon.png","language":"Java","readme":"# Compare Java Spring Boot containerization options\n\n\u003c!-- TOC --\u003e\n* [Compare Java Spring Boot containerization options](#compare-java-spring-boot-containerization-options)\n  * [Application](#application)\n  * [Containerization](#containerization)\n    * [Gradle](#gradle)\n      * [From Jar](#from-jar)\n      * [Multistage](#multistage)\n      * [Multistage (Gradle Wrapper)](#multistage-gradle-wrapper)\n      * [Buildpack](#buildpack)\n      * [Jib](#jib)\n    * [Maven](#maven)\n      * [From Jar](#from-jar-1)\n      * [Multistage](#multistage-1)\n      * [Multistage (Maven Wrapper)](#multistage-maven-wrapper)\n      * [Buildpack](#buildpack-1)\n      * [Jib](#jib-1)\n\u003c!-- TOC --\u003e\n\n\n---\n## Application\nthis is simple hello-world application that expose two ports 8080, 8081\n\n```bash\ncurl http://localhost:8080/hello\ncurl http://localhost:8081/actuator/health\ncurl http://localhost:8081/actuator/info\n```\n\n---\n## Containerization\n\n### Gradle\n#### From Jar\n```bash\n./gradlew clean build\ndocker build -f docker/Dockerfile.gradle-jar -t containerized-app:gradle-jar .\n```\n\n#### Multistage\n```bash\ndocker build -f docker/Dockerfile.gradle-multistage -t containerized-app:gradle-multistage .\n```\n\n#### Multistage (Gradle Wrapper)\n```bash\ndocker build -f docker/Dockerfile.gradlew-multistage -t containerized-app:gradlew-multistage .\n```\n\n#### [Buildpack](https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#build-image.examples)\n```bash\n./gradlew bootBuildImage --imageName=containerized-app:gradle-buildpack\n```\n```bash\n# Build image with git commit id as version\n./gradlew bootBuildImage\n```\n\n#### [Jib](https://github.com/GoogleContainerTools/jib/blob/master/jib-gradle-plugin/README.md)\n```bash\n./gradlew jibDockerBuild --image=containerized-app:gradle-jib\n```\n\n### Maven\n#### From Jar\n```bash\n./mvnw clean verify\ndocker build -f docker/Dockerfile.mvn-jar -t containerized-app:mvn-jar .\n```\n\n#### Multistage\n```bash\ndocker build -f docker/Dockerfile.mvn-multistage -t containerized-app:mvn-multistage .\n```\n\n#### Multistage (Maven Wrapper)\n```bash\ndocker build -f docker/Dockerfile.mvnw-multistage -t containerized-app:mvnw-multistage .\n```\n\n#### [Buildpack](https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/#build-image.examples)\n```bash\n./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=containerized-app:mvn-buildpack\n```\n```bash\n# Build image with git commit id as version\n./mvnw spring-boot:build-image\n```\n\n#### [Jib](https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md)\n```bash\n./mvnw compile jib:dockerBuild -Dimage=containerized-app:mvn-jib\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitxon%2Fjava-spring-containerization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitxon%2Fjava-spring-containerization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitxon%2Fjava-spring-containerization/lists"}