-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.template
62 lines (53 loc) · 1.35 KB
/
Dockerfile.template
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# base-image for python on any machine using a template variable,
FROM resin/raspberrypi3-debian:latest
ENV INITSYSTEM on
# Set our working directory
WORKDIR /usr/src/app
# Set the device type environment variable using Dockerfile templates
ENV DEVICE_TYPE=%%RESIN_MACHINE_NAME%%
RUN apt-get update && apt-get upgrade && apt-get dist-upgrade
RUN apt-get install -y \
apt-utils \
xserver-xorg \
xinit \
lxde \
lxde-core \
lxappearance \
clang \
xserver-xorg-core \
xserver-xorg-input-all \
xserver-xorg-video-fbdev \
xorg \
x11-common \
x11-utils \
x11-xkb-utils \
x11-xserver-utils \
xauth \
xdg-user-dirs \
xfce-keyboard-shortcuts \
xfconf \
xfonts-100dpi \
xfonts-encodings \
xfonts-utils \
xkb-data \
xml-core \
xserver-common \
xserver-xorg-core \
xserver-xorg-input-all \
xserver-xorg-input-evdev \
xserver-xorg-input-synaptics \
xterm \
build-essential \
libfuzzy-dev \
cron
# This will copy all files in our root to the working directory in the container
COPY . ./
RUN sed -i "2i xset s off" /etc/X11/xinit/xinitrc
RUN sed -i "3i xset -dpms" /etc/X11/xinit/xinitrc
RUN sed -i "4i xset s noblank" /etc/X11/xinit/xinitrc
# switch on systemd init system in container
RUN touch /root/.Xauthority
ENV DISPLAY 0.0
RUN export DISPLAY=:0.0
# main.py will run when container starts up on the device
CMD ["startx"]