Public Repository

Last pushed: a year ago
Short Description
mars eclipse jee
Full Description

step 0 : set the core os
FROM ubuntu:14.04
RUN apt-get update

step 1 : install java 8

http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/
RUN apt-get install -y software-properties-common

http://askubuntu.com/questions/493460/how-to-install-add-apt-repository-using-the-terminal
RUN add-apt-repository ppa:webupd8team/java #need to press enter ?
RUN apt-get update
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
RUN apt-get install -y oracle-java8-installer
RUN apt-get install oracle-java8-set-default

step 2 : install eclipse

miscellanous dependencies
https://www.eclipse.org/swt/faq.php#whatpackagesinSWT
RUN apt-get install -y libgnomeui-dev libxtst-dev freeglut3-dev libgtk-3-dev libgtk2.0-dev

downloading the eclipse archive is to long then we just copy it from host
ADD /eclipse /eclipse
RUN tar xzf /eclipse/*.tar.gz

step 3 : set the workspace directory
http://container-solutions.com/understanding-volumes-docker/
VOLUME /data/eclipse-workspace # directly available on the host
CMD ./eclipse/eclipse - data /data/eclipse-workspace

miscellanous remarks :

  • to use xserver (xming) to display gui, use : -it -e DISPLAY="<your IP address>:<disp-number>"
    • opt_number is generally set to 0, it depends on how you configured your xserver
    • the xserver should be already running to display the container gui apps
    • tip : define $DISPLAY var (DISPLAY=...) in CLI with "<your IP address>:<disp-number>" value ;) . Then the command becomes DISPLAY=$DISPLAY
Docker Pull Command
Owner
erfu

Comments (0)