-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile
41 lines (35 loc) · 1.37 KB
/
Dockerfile
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
36
37
38
39
40
41
FROM ubuntu:16.04
ENV HOME /home/developer
WORKDIR /home/developer
# Replace 1000 with your user / group id
RUN export uid=1000 gid=1000 && \
mkdir -p /home/developer && \
mkdir -p /etc/sudoers.d && \
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
echo "developer:x:${uid}:" >> /etc/group && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer && \
chown ${uid}:${gid} -R /home/developer && \
apt-get update \
&& apt-get install -y \
software-properties-common \
wget \
openjdk-9-jre \
xvfb \
xz-utils \
sudo \
&& add-apt-repository ppa:ubuntuhandbook1/apps \
&& apt-get update \
&& apt-get install -y avrdude avrdude-doc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Add developer user to the dialout group to be able to write the serial USB device
RUN sed "s/^dialout.*/&developer/" /etc/group -i \
&& sed "s/^root.*/&developer/" /etc/group -i
ENV ARDUINO_IDE_VERSION 1.8.5
RUN (wget -q -O- https://downloads.arduino.cc/arduino-${ARDUINO_IDE_VERSION}-linux64.tar.xz \
| tar xJC /usr/local/share \
&& ln -s /usr/local/share/arduino-${ARDUINO_IDE_VERSION} /usr/local/share/arduino \
&& ln -s /usr/local/share/arduino-${ARDUINO_IDE_VERSION}/arduino /usr/local/bin/arduino)
ENV DISPLAY :1.0
USER developer