Coder Social home page Coder Social logo

docker-eclipse's Introduction

docker-eclipse

Eclipse v4.4.1 in a Docker container

Requirements

  • Docker 1.2+ (should work fine on 1.0+ but I haven't tried)
  • An X11 socket

Quickstart

Assuming $HOME/bin is on your PATH and that you are able to run docker commands without sudo, you can use the provided eclipse script to start a disposable Eclipse Docker container with your project sources mounted at /home/developer/workspace within the container:

# The image size is currently 1.131 GB, so go grab a coffee while Docker downloads it
docker pull fgrehm/eclipse:v4.4.1
L=$HOME/bin/eclipse && curl -sL https://github.com/fgrehm/docker-eclipse/raw/master/eclipse > $L && chmod +x $L
cd /path/to/java/project
eclipse

Once you close Eclipse the container will be removed and no traces of it will be kept on your machine (apart from the Docker image of course).

Making plugins persist between sessions

Eclipse plugins are kept on $HOME/.eclipse inside the container, so if you want to keep them around after you close it, you'll need to share it with your host.

For example:

mkdir -p .eclipse-docker
docker run -ti --rm \
           -e DISPLAY=$DISPLAY \
           -v /tmp/.X11-unix:/tmp/.X11-unix \
           -v `pwd`/.eclipse-docker:/home/developer \
           -v `pwd`:/workspace \
           fgrehm/eclipse:v4.4.1

Help! I started the container but I don't see the Eclipse screen

You might have an issue with the X11 socket permissions since the default user used by the base image has an user and group ids set to 1000, in that case you can run either create your own base image with the appropriate ids or run xhost + on your machine and try again.

docker-eclipse's People

Contributors

fgrehm avatar jamesmstone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-eclipse's Issues

Dead link in Dockerfile

Dead link in Dockerfile

The Dockerfile as of this writing uses a Brazilian mirror, eclipse.c3sl.ufpr.br. However, the link was dead for me (I'm in the US). I was able to use a different mirror with success (download.nus.edu.sg).

I updated the Dockerfile as follows:

#RUN wget http://eclipse.c3sl.ufpr.br/technology/epp/downloads/release/luna/SR1/eclipse-java-luna-SR1-linux-gtk-x86_64.tar.gz -O /tmp/eclipse.tar.gz -q && \
RUN wget https://download.nus.edu.sg/mirror/eclipse/technology/epp/downloads/release/luna/SR1/eclipse-java-luna-SR1-linux-gtk-x86_64.tar.gz -O /tmp/eclipse.tar.gz -q && \
    echo 'Installing eclipse' && \
    tar -xf /tmp/eclipse.tar.gz -C /opt && \
    rm /tmp/eclipse.tar.gz

... and re-ran the ./build script, and that worked.

unable to move modal dialog (whole eclipse window is moved)

started using:

docker run -ti --rm \
       -e DISPLAY=$DISPLAY \
       -v /tmp/.X11-unix:/tmp/.X11-unix \
       fgrehm/eclipse:v4.4.1

Afterwards opened Window->Preferences.
It is not possible to move or resize the Preferences dialog. Once moving, the whole Eclipse window is moving.

Any idea for workarounds?

Configuration could not be created

docker run --rm
-e DISPLAY=$DISPLAY
-v /tmp/.X11-unix:/tmp/.X11-unix
-v pwd/.eclipse-docker:/home/developer
-v pwd:/workspace
fgrehm/eclipse:v4.4.1
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Eclipse: Cannot open display:
Invalid Configuration Location:
The configuration area at '/home/developer/.eclipse/org.eclipse.platform_4.4.1_1473617060_linux_gtk_x86_64/configuration' could not be created. Please choose a writable location using the '-configuration' command line option.
use bash look
/home/developer
drwxr-xr-x. 2 root root 6 Apr 10 07:20 developer
developer@7aba007:/home$

developer No Permission

Eclipse can not open display.

On docker run :

docker run -ti --rm
-e DISPLAY=$DISPLAY
-v /tmp/.X11-unix:/tmp/.X11-unix
-v pwd:/workspace
fgrehm/eclipse:v4.4.1

returns

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Eclipse: Cannot open display:
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized.
Eclipse: Cannot open display:
Eclipse:
An error has occurred. See the log file
/home/developer/.eclipse/org.eclipse.platform_4.4.0_1473617060_linux_gtk_x86_64/configuration/1463424228669.log.

Please help to solve this issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.