{"id":19019746,"url":"https://github.com/monosoul/jvm-in-docker","last_synced_at":"2025-04-23T05:19:59.942Z","repository":{"id":72304316,"uuid":"485473010","full_name":"monosoul/jvm-in-docker","owner":"monosoul","description":"A repo to demonstrate how to use jlink","archived":false,"fork":false,"pushed_at":"2022-04-26T11:42:23.000Z","size":6685,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-17T20:39:31.740Z","etag":null,"topics":["docker","java","jvm"],"latest_commit_sha":null,"homepage":"https://blog.monosoul.dev/2022/04/25/reduce-java-docker-image-size/","language":"Dockerfile","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/monosoul.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,"zenodo":null}},"created_at":"2022-04-25T17:40:49.000Z","updated_at":"2024-07-16T09:58:43.000Z","dependencies_parsed_at":"2023-03-08T23:15:30.560Z","dependency_job_id":null,"html_url":"https://github.com/monosoul/jvm-in-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monosoul%2Fjvm-in-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monosoul%2Fjvm-in-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monosoul%2Fjvm-in-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monosoul%2Fjvm-in-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monosoul","download_url":"https://codeload.github.com/monosoul/jvm-in-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250373783,"owners_count":21419872,"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":["docker","java","jvm"],"created_at":"2024-11-08T20:14:20.436Z","updated_at":"2025-04-23T05:19:59.932Z","avatar_url":"https://github.com/monosoul.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jvm-in-docker\nA repo to demonstrate how to use jlink\n\n---\n\nTo build image with JDK:\n`docker build -t jvm-in-docker:jdk -f jdk.dockerfile .`\n\nTo run JDK image:\n`docker run --rm -p 8080:8080 jvm-in-docker:jdk`\n\n---\n\nTo build JRE image:\n`docker build -t jvm-in-docker:jre -f jre.dockerfile .`\n\nTo run JRE image:\n`docker run --rm -p 8080:8080 jvm-in-docker:jre`\n\n---\n\nTo analyze dependencies:\n```shell\nmkdir app\ncd ./app\nunzip ../app.jar\ncd ..\njdeps --print-module-deps --ignore-missing-deps --recursive --multi-release 17 --class-path ./app/BOOT-INF/lib/* ./app.jar\nrm -Rf ./app\n```\n\nShould give you:\n\n`java.base,java.management,java.naming,java.net.http,java.security.jgss,java.security.sasl,java.sql,jdk.httpserver,jdk.unsupported`\n\nTo build slim JRE image:\n`docker build -t jvm-in-docker:jre-slim -f jre-slim.dockerfile .`\n\nTo run slim JRE image:\n`docker run --rm -p 8080:8080 jvm-in-docker:jre-slim`\n\n---\n\nTo build slim JRE image with automated dependency analysis:\n`docker build -t jvm-in-docker:jre-slim -f jre-slim-auto.dockerfile .`\n\n--\n\n![screenshot](screenshot.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonosoul%2Fjvm-in-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonosoul%2Fjvm-in-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonosoul%2Fjvm-in-docker/lists"}