• LOGIN
  • No products in the cart.

DevOps on AWS – Docker Image File for Java

Docker File:

# Ubuntu with Java 8 installed.

FROM ubuntu
MAINTAINER G venkat g.venkat09@gmail.com
RUN apt-get update &&
    apt-get upgrade -y &&
    apt-get install -y  software-properties-common &&
    add-apt-repository ppa:webupd8team/java -y &&
    apt-get update &&
    echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections &&
    apt-get install -y oracle-java8-installer &&
    apt-get clean




Cmds:

Java Docker File:
docker build -f Dockerfile -t rns/oracle-java:8 .

To compile your Main.java file.
$ docker run –rm -v $PWD:/app -w /app rns/oracle-java:8 javac Main.java

To run your compiled Main.class file.
$ docker run –rm -v $PWD:/app -w /app rns/oracle-java:8 java Main
February 22, 2021

Contact Address

Rise ‘n’ Shine Technologies:
Third Floor, Plot No1(Part), near KPHB Metro Station, KPHB Bagyanagar Colony, Kukatpally Main road, Balanagar Mandal, Rangareddy Dist-500072

Landmarks : Above VIOLET & PURPLE, near PJR statue, kphb metro station

  8686 98 8042
rnstech.fmw@gmail.com

Location

All rights reserved.
error: Alert: Content is protected !!
X