-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile.template
59 lines (52 loc) · 1.57 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
FROM %%FROM%%
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /opt/oak
RUN printf "deb http://httpredir.debian.org/debian stretch-backports main non-free\ndeb-src http://httpredir.debian.org/debian stretch-backports main non-free" > /etc/apt/sources.list.d/backports.list \
&& apt-get update -q && apt-get install -t stretch-backports -y -q --no-install-recommends \
apt-utils \
build-essential \
dbus-x11 \
libasound2 \
libcanberra-gtk-module \
libcurl3 \
libexif-dev \
libgconf-2-4 \
libgl1-mesa-dri \
libgl1-mesa-glx \
libgtk3.0 \
libdrm-intel1 \
libnotify4 \
libnss3 \
libusb-1.0-0 \
libusb-1.0.0-dev \
libxss1 \
libxtst6 \
libxcursor1 \
python \
xvfb \
xauth
COPY . /opt/oak
RUN npm install \
&& npm test \
&& npm prune --production \
&& apt-get remove --purge -y xvfb xauth \
&& apt-get autoremove -y \
&& npm link \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.electron
ENTRYPOINT ["oak"]
ENV npm_config_target=%%ELECTRON_VERSION%% \
npm_config_runtime=electron \
npm_config_arch=x64 \
npm_config_target_arch=x64 \
npm_config_disturl=https://atom.io/download/electron \
DEBUG=false \
NODE_ENV=production \
ELECTRON_VERSION=%%ELECTRON_VERSION%% \
DISPLAY=:0 \
IGNORE_GPU_BLACKLIST=false \
NODE_TLS_REJECT_UNAUTHORIZED=0 \
ELECTRON_DISABLE_SECURITY_WARNINGS=true \
# nvidia card specific env vars
PATH=/usr/local/nvidia/bin:$PATH \
LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64