Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

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 Pull Command
Owner
fgrehm
Source Repository

Comments (3)
abdessattarstr
7 months ago

I'm trying to install the image on docker windows (boot2docker), but when launching I have the error "Eclipse: Can not open display:"!
Im missing a prerequisite?
Thank you for your help.

devenkher
a year ago

@adkinss try this command
"docker pull fgrehm/eclipse:v4.4.1"

That worked for me

adkinss
a year ago

This is great, thank you! However, there is no "latest" tag associated with the image, so doing a simple "docker pull fgrehm/eclipse" fails. Can you add the "latest" tag? It's that, or update the "Docker Pull Command" box (upper right of this page) to include the proper pull command like you already describe in your description.