I've a project with spring boot 2.5.1
When I create the docker image with the following command
mvn -B spring-boot:build-image -Dspring-boot.build-image.imageName=franco -DskipTests
and then i run it with docker run franco
I see the following error
2021-06-25 10:23:11.173 ERROR 1 --- [ main] o.s.b.c.FileEncodingApplicationListener : System property 'file.encoding' is currently 'ANSI_X3.4-1968'. It should be 'UTF-8' (as defined in 'spring.mandatoryFileEncoding').
2021-06-25 10:23:11.177 ERROR 1 --- [ main] o.s.b.c.FileEncodingApplicationListener : Environment variable LANG is 'null'. You could use a locale setting that matches encoding='UTF-8'.
2021-06-25 10:23:11.178 ERROR 1 --- [ main] o.s.b.c.FileEncodingApplicationListener : Environment variable LC_ALL is 'null'. You could use a locale setting that matches encoding='UTF-8'.
2021-06-25 10:23:11.397 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
How can i set this env variable using the build-image goal?