How run java and maven on gitlab runner that run as docker container

Dear All
I installed gitlab runner as docker container , and used shell executor
i want write gitlab-ci for my java project
how install java and maven on my runner (that run as container on docker) to run below script :

stage: build
script: mvn clean install


I suggest to start here Get started with GitLab CI/CD | GitLab

i know how create ci cd pipeline on local gitlab server and gitlab runner , but i want to know how install java and maven and pip and … on gitlab runner that create on docker container !!