{"id":30605443,"url":"https://github.com/vegardit/docker-graalvm-maven","last_synced_at":"2025-08-30T02:04:40.119Z","repository":{"id":43063223,"uuid":"317894756","full_name":"vegardit/docker-graalvm-maven","owner":"vegardit","description":"Docker image to build native Linux binaries from Java Maven projects using GraalVM native-image feature.","archived":false,"fork":false,"pushed_at":"2025-08-14T15:25:22.000Z","size":118,"stargazers_count":34,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-14T17:13:03.724Z","etag":null,"topics":["docker-image","graalvm","graalvm-native-image","maven"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vegardit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2020-12-02T14:51:51.000Z","updated_at":"2025-08-14T15:25:26.000Z","dependencies_parsed_at":"2023-11-20T17:28:31.810Z","dependency_job_id":"42a6b3ed-9866-4b5a-bef9-f1e0c7f84ea5","html_url":"https://github.com/vegardit/docker-graalvm-maven","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vegardit/docker-graalvm-maven","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegardit%2Fdocker-graalvm-maven","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegardit%2Fdocker-graalvm-maven/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegardit%2Fdocker-graalvm-maven/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegardit%2Fdocker-graalvm-maven/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vegardit","download_url":"https://codeload.github.com/vegardit/docker-graalvm-maven/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegardit%2Fdocker-graalvm-maven/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272793018,"owners_count":24993830,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"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-image","graalvm","graalvm-native-image","maven"],"created_at":"2025-08-30T02:04:39.413Z","updated_at":"2025-08-30T02:04:40.109Z","avatar_url":"https://github.com/vegardit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-graalvm-maven \u003ca href=\"https://github.com/vegardit/docker-graalvm-maven/\" title=\"GitHub Repo\"\u003e\u003cimg height=\"30\" src=\"https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/github.svg?sanitize=true\"\u003e\u003c/a\u003e\n\n[![Build Status](https://github.com/vegardit/docker-graalvm-maven/workflows/Build/badge.svg \"GitHub Actions\")](https://github.com/vegardit/docker-graalvm-maven/actions?query=workflow%3ABuild)\n[![License](https://img.shields.io/github/license/vegardit/docker-graalvm-maven.svg?label=license)](#license)\n[![Docker Pulls](https://img.shields.io/docker/pulls/vegardit/graalvm-maven.svg)](https://hub.docker.com/r/vegardit/graalvm-maven)\n[![Docker Stars](https://img.shields.io/docker/stars/vegardit/graalvm-maven.svg)](https://hub.docker.com/r/vegardit/graalvm-maven)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.1%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)\n\n1. [What is it?](#what-is-it)\n1. [Usage](#usage)\n1. [License](#license)\n\n\n## \u003ca name=\"what-is-it\"\u003e\u003c/a\u003eWhat is it?\n\nOpinionated docker image based on the [Debian](https://www.debian.org/) docker image [`debian:stable-slim`](https://hub.docker.com/_/debian?tab=tags\u0026name=stable-slim) to\nbuild native Linux binaries from Java [Maven](http://maven.apache.org/) projects using [GraalVM CE](https://www.graalvm.org/) [native-image](https://www.graalvm.org/reference-manual/native-image/) feature.\n\nIt is automatically built **weekly** to include the latest OS security fixes.\n\nThe image comes pre-installed with latest releases of:\n- [Apache Maven](http://maven.apache.org/download.cgi) build automation tool for Java projects\n- [Docker CE (Community Edition)](https://download.docker.com/linux/debian/dists/bullseye/pool/stable/amd64/) command line client\n- [GraalVM CE (Community Edition) for JDK 11, 17, 21 or 24](https://www.graalvm.org/downloads/) with [native-image](https://www.graalvm.org/reference-manual/native-image/) extension\n- tools:\n  - [bash-funk](https://github.com/vegardit/bash-funk) Bash toolbox with adaptive Bash prompt\n  - [git](https://packages.debian.org/en/git) command line client\n  - [htop](https://htop.dev/) interactive process viewer\n  - [mc](https://midnight-commander.org/) aka Midnight Commander\n  - [openssh-client](https://packages.debian.org/en/openssh-client) SSH command line client\n  - [upx](https://upx.github.io/) executable packer\n  - [Vim](https://www.vim.org/) text editor\n\n\n\nFurther we add the user `user` with uid `1000` and gid `1000` as non-privileged user in order to run without root privileges.\nNote, that the user is not set to 1000 within the docker image. Specify the uid to be `1000` with your docker run command.\n\n\n## \u003ca name=\"tags\"\u003e\u003c/a\u003eDocker image tagging scheme\n\n|Tag|Description\n|-|-\n|\u003cpre\u003e:latest-java11\u003cbr\u003e:latest-java17\u003cbr\u003e:latest-java21\u003cbr\u003e:latest-java24\u003c/pre\u003e | latest available [GraalVM CE releases](https://github.com/graalvm/graalvm-ce-builds/releases) for the given JDK\n|\u003cpre\u003e:dev-java25\u003c/pre\u003e | latest available [GraalVM CE development builds](https://github.com/graalvm/graalvm-ce-dev-builds/releases) for the given JDK\n|\u003cpre\u003e:XX.Y.Z\u003c/pre\u003e | the given GraalVM CE releases (e.g. `17.0.8` for JDK 17 and `21.0.0` for JDK 21) following GraaLVM's [new version naming scheme](https://medium.com/graalvm/a-new-graalvm-release-and-new-free-license-4aab483692f5#8822).\n|\u003cpre\u003e:XX.Y.Z-java11\u003cbr\u003e:XX.Y.Z-java17\u003c/pre\u003e | the given GraalVM CE releases (e.g. `22.3.2-java11`) following GraaLVM's **old version naming scheme**\n\nSee all available tags at https://hub.docker.com/r/vegardit/graalvm-maven/tags\n\n\n\n## Usage\n\n### Building a local Maven project\n\nTo build a Maven project located on your local workstation with via this docker image you can do:\n\n1. On Linux:\n    ```bash\n    $ cd ~/myproject\n    $ docker run --rm -it \\\n      -v $PWD:/mnt/myproject:rw \\\n      -w /mnt/myproject \\\n      vegardit/graalvm-maven:latest-java17 \\\n      mvn clean package\n    ```\n\n1. On Windows:\n    ```batch\n    C:\u003e cd C:\\Users\\MyUser\\myproject\n    C:\\Users\\MyUser\\myproject\u003e docker run --rm -it ^\n      -v /c/Users/MyUser/myproject:/mnt/myproject:rw ^\n      -w /mnt/myproject ^\n      vegardit/graalvm-maven:latest-java17 ^\n      mvn clean package\n    ```\n\nAlso checkout the [example](example) project which provides convenient batch/bash script wrappers and outlines how to do compile Java projects to native Linux binaries.\n\n\n### Using custom Maven settings.xml\n\nYou can use a custom Maven [settings.xml](https://maven.apache.org/settings.html) by mounting it to `/root/.m2/settings.xml`\n\n```bash\n    $ cd ~/myproject\n    $ docker run --rm -it \\\n      -v /path/to/my/settings.xml:/root/.m2/settings.xml:ro \\\n      -v $PWD:/mnt/myproject:rw \\\n      -w /mnt/myproject \\\n      vegardit/graalvm-maven:latest-java17 \\\n      mvn clean package\n```\n\n\n### Running docker commands inside the container\n\nThis image has the docker command line client installed, which allows you to run other docker containers as part of your build toolchain using a\n[docker-out-of-docker (DooD)](http://blog.teracy.com/2017/09/11/how-to-use-docker-in-docker-dind-and-docker-outside-of-docker-dood-for-local-ci-testing/) approach\nby mounting the `/var/run/docker.sock` into the container.\n\n```bash\n$ cd ~/myproject\n$ docker run --rm -it \\\n  -v /var/run/docker.sock:/var/run/docker.sock:rw \\\n  -v $PWD:/mnt/myproject:rw \\\n  vegardit/graalvm-maven:latest-java17 \\\n  docker run --rm hello-world\n```\n\n\n### Caching local Maven repository between runs\n\nYou can a local folder to `/root/.m2/repository` to cache the downloaded artifacts between Maven runs\n\n```bash\n    $ cd ~/myproject\n    $ docker run --rm -it \\\n      -v /path/to/my/local/repository:/root/.m2/repository:rw \\\n      -v $PWD:/mnt/myproject:rw \\\n      -w /mnt/myproject \\\n      vegardit/graalvm-maven:latest-java17 \\\n      mvn clean package\n```\n\n\n\n## \u003ca name=\"license\"\u003e\u003c/a\u003eLicense\n\nAll files in this repository are released under the [Apache License 2.0](LICENSE.txt).\n\nIndividual files contain the following tag instead of the full license text:\n```\nSPDX-License-Identifier: Apache-2.0\n```\n\nThis enables machine processing of license information based on the SPDX License Identifiers that are available here: https://spdx.org/licenses/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegardit%2Fdocker-graalvm-maven","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvegardit%2Fdocker-graalvm-maven","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegardit%2Fdocker-graalvm-maven/lists"}