forked from openhab/openhab-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 731 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 731 Bytes
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
FROM node:14-alpine
RUN apk add --no-cache tzdata gettext
RUN addgroup -S openhabcloud && \
adduser -H -S -G openhabcloud openhabcloud
# Add proper timezone
ARG TZ=Europe/Berlin
RUN ln -s /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo "${TZ}" > /etc/timezone
WORKDIR /opt/openhabcloud
# Install node modules
COPY package.json package-lock.json ./
RUN apk add --no-cache --virtual .build-deps build-base python3 && \
npm install && npm rebuild bcrypt --build-from-source && \
apk del .build-deps
# Prepare source tree
RUN chown openhabcloud:openhabcloud .
RUN mkdir logs && chown openhabcloud:openhabcloud logs
COPY --chown=openhabcloud:openhabcloud . .
USER openhabcloud
EXPOSE 3000
CMD ["./run-app.sh"]