DEV Community

Cover image for Using JLink to create smaller Docker images for your Spring Boot Java application

Using JLink to create smaller Docker images for your Spring Boot Java application

SnykSec on August 25, 2023

Author: Brian Vermeer Containers bring new flexibility and agility to software development and deployment. However, they also introduce a new atta...
Collapse
 
cicirello profile image
Vincent A. Cicirello

Consider using syntax highlighting in your code blocks. For example:

```Docker
FROM maven:3-eclipse-temurin-17 as build
RUN mkdir /usr/src/project
COPY . /usr/src/project
WORKDIR /usr/src/project
RUN mvn package -DskipTests
```
Enter fullscreen mode Exit fullscreen mode

Produces:

FROM maven:3-eclipse-temurin-17 as build
RUN mkdir /usr/src/project
COPY . /usr/src/project
WORKDIR /usr/src/project
RUN mvn package -DskipTests
Enter fullscreen mode Exit fullscreen mode