'How to build a docker container in eclipse-temurin with maven?

I'm starting to build a java application container with docker. I'd like to build the jar directly inside the docker container itself. But the following always fails. Why?

# syntax=docker/dockerfile:1
FROM eclipse-temurin:11 as build
WORKDIR application

COPY .mvn .mvn


Solution 1:[1]

FROM maven:3.8.4-eclipse-temurin-11 as build

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dharman