-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile
46 lines (32 loc) · 1.5 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
FROM node:8.16.0
LABEL maintainer="[email protected]"
LABEL name="Vizcentric"
RUN apt-get -y update && \
apt-get -y install net-tools && \
apt-get -y install wget tar && \
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz && \
tar -xJvf wkhtmltox*.tar.xz && \
mv wkhtmltox/bin/wkhtmlto* /usr/bin && \
rm -rf wkhtmltox* && \
apt-get -y clean
ADD https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.3.0/grpc_health_probe-linux-amd64 /bin/grpc_health_probe
COPY package*.json /flair-notifications/
COPY scripts/button.sh /flair-notifications/
COPY .sequelizerc /flair-notifications/
COPY certs/server.crt /flair-notifications/certs/certChainFile.crt
COPY certs/server.key /flair-notifications/certs/privateKeyFile.key
COPY certs/ca.crt /flair-notifications/certs/trustCertCollectionFile.crt
WORKDIR /flair-notifications/
RUN npm install --only=production
COPY app /flair-notifications/app/
VOLUME [ "/flair-notifications/images", "/flair-notifications/compressImages", "/flair-notifications/config" ]
EXPOSE 8080
WORKDIR /flair-notifications/
RUN groupadd -g 999 flairuser && \
useradd --shell /bin/bash --create-home --home /home/flairuser -r -u 999 -g flairuser flairuser
RUN chown -R flairuser:flairuser /flair-notifications
RUN chown -R flairuser:flairuser /usr/bin/wkhtmltoimage
RUN chmod -R 755 /flair-notifications
RUN chmod +x /bin/grpc_health_probe
USER flairuser
CMD [ "sh", "./button.sh" ]