forked from fgrehm/docker-eclipse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (28 loc) · 1.37 KB
/
Dockerfile
File metadata and controls
35 lines (28 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y software-properties-common && \
apt-get install -y openjdk-8-jdk libxext-dev libxrender-dev libxtst-dev wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*
# Install libgtk as a separate step so that we can share the layer above with
# the netbeans image
RUN apt-get update && apt-get install -y libgtk2.0-0 libcanberra-gtk-module
RUN wget http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/oxygen/2/eclipse-java-oxygen-2-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
ADD run /usr/local/bin/eclipse
RUN apt-get update && apt-get install -y sudo
RUN chmod +x /usr/local/bin/eclipse && \
mkdir -p /home/developer && \
echo "developer:x:1000:1000:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
echo "developer:x:1000:" >> /etc/group && \
mkdir -p /etc/sudoers.d/ && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer && \
chown developer:developer -R /home/developer && \
chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo
USER developer
ENV HOME /home/developer
WORKDIR /home/developer
CMD /usr/local/bin/eclipse