https://github.com/mossabtn/spring-native-example
https://github.com/mossabtn/spring-native-example
docker graalvm native-image spring
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mossabtn/spring-native-example
- Owner: MossabTN
- Created: 2021-03-21T19:57:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-21T23:44:17.000Z (over 5 years ago)
- Last Synced: 2025-03-02T10:14:21.550Z (over 1 year ago)
- Topics: docker, graalvm, native-image, spring
- Language: Java
- Homepage:
- Size: 139 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create a Spring Native Application
## Requirements
To compile and run this demo you will need:
- JDK 11
- Maven
- Docker
## Setup
###### Start spring application
```bash
$ mvn package spring-boot:run
```
###### Build the native application
> **Tip**: On MacOS, it is recommended to increase the memory allocated to Docker to at least **`8GB`**, and potentially add more CPUs as well. See this [**Stackoverflow answer**](https://stackoverflow.com/questions/44533319/how-to-assign-more-memory-to-docker-container/44533437#44533437) for more details. On Microsoft Windows, make sure to enable the [**Docker WSL 2 backend**](https://docs.docker.com/docker-for-windows/wsl/) for better performance
```bash
$ mvn spring-boot:build-image
```
###### Run the native application
```bash
$ docker run -p 8080:8080 spring-native-example:1.0.0
```
