forked from home-assistant/addons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
57 lines (51 loc) · 1.47 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
ARG BUILD_FROM
FROM ${BUILD_FROM}
# Install Alomond requirements
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
software-properties-common \
gnupg \
nginx \
unzip \
\
&& curl -sS https://deb.nodesource.com/gpgkey/nodesource.gpg.key \
| apt-key add - \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg \
| apt-key add - \
&& echo "deb https://deb.nodesource.com/node_12.x buster main" \
> /etc/apt/sources.list.d/nodesource.list \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" \
> /etc/apt/sources.list.d/yarn.list \
\
&& apt-get update && apt-get install -y --no-install-recommends \
nodejs \
yarn \
&& rm -rf /var/lib/apt/lists/*
# Install Almond
ARG ALMOND_VERSION
WORKDIR /opt/almond
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
python-dev \
build-essential \
\
&& git clone -b "${ALMOND_VERSION}" --depth 1 \
"https://github.com/stanford-oval/almond-server" . \
&& rm -fr .git \
&& yarn \
\
&& apt-get purge -y --auto-remove \
git \
python-dev \
build-essential \
&& rm -rf \
/var/lib/apt/lists/* \
/root/.cache
# Base env settings
ENV LANG=en_US.utf8
ENV THINGENGINE_HOME=/data/almond-server
ENV THINGENGINE_HOST_BASED_AUTHENTICATION=local-ip
COPY data/run.sh /
COPY data/nginx.conf /etc/nginx/
CMD ["/run.sh"]