-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (24 loc) · 809 Bytes
/
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
FROM node:12-alpine as builder
LABEL MAINTAINER="Michael Hobl <[email protected]>"
RUN apk update && \
apk add --no-cache \
git \
build-base \
python3
RUN git clone https://github.com/genieacs/genieacs.git /install
WORKDIR /install
RUN npm install && \
npm run build
FROM node:12-alpine as main
COPY --from=builder /install /opt/genieacs
WORKDIR /opt/genieacs
RUN apk add --no-cache \
coreutils
RUN mkdir -p /opt/genieacs/config
ENV GENIEACS_MONGODB_CONNECTION_URL=mongodb://db/genieacs
ENV GENIEACS_DEBUG_FILE=/var/log/genieacs-debug.yaml
RUN addgroup -S genieacs && adduser -S genieacs -G genieacs \
&& chown -R genieacs:genieacs /opt/genieacs
RUN mkdir -p /var/log/genieacs && chown genieacs:genieacs /var/log/genieacs
USER genieacs
VOLUME ["/var/log"]