Search code examples
dockerscriptingdocker-machine

Installing jdk,maven,and GIT through command


Hi im new to docker and scripted long back, now i need to install latest jdk,maven and GIT using docker, i mean i need to image these 3 steps.. Can anyone help me out with script writing. im using win7 and latest docker for now.

thank you in advance


Solution

  • Steps:

    1. Selecting Base Image: You can select Ubuntu, Centos or Alpine whose size is 4mb.
    2. Download components

    FROM ubuntu:14.04

    RUN apt-get update && apt-get install openjdk-8-jdk git maven

    Save the file as Dockerfile and build it using docker build command