forked from home-assistant/addons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (58 loc) · 1.3 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ARG BUILD_FROM
FROM ${BUILD_FROM}
# Base env settings
ENV \
LANG="en_US.utf8" \
THINGENGINE_HOME="/data/almond-server" \
THINGENGINE_HOST_BASED_AUTHENTICATION="local-ip"
WORKDIR /opt/almond
ARG ALMOND_VERSION
RUN \
set -x \
&& apk add --no-cache \
nodejs \
npm \
yarn \
nginx \
unzip \
blas \
sqlite \
coreutils \
&& apk add --no-cache --virtual .build-dependencies \
build-base \
blas-dev \
git \
linux-headers \
sqlite-dev \
pkgconf \
python3 \
\
&& npm config set unsafe-perm \
&& ln -s /usr/bin/python3 /usr/bin/python \
\
&& git clone -b "${ALMOND_VERSION}" --depth 1 \
"https://github.com/stanford-oval/almond-server" . \
&& rm -fr .git \
&& yarn \
\
&& yarn global add modclean \
&& modclean \
--path /opt/almond \
--no-progress \
--keep-empty \
--run \
&& yarn global remove modclean \
\
&& yarn cache clean \
&& apk del --no-cache \
.build-dependencies \
\
&& rm -rf \
/opt/almond/.[!.]* \
/root/.cache \
/root/.config \
/tmp/.[!.]* \
/tmp/* \
/usr/local/share/.cache \
/usr/local/share/.config
COPY rootfs /