-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
33 lines (26 loc) · 1.02 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
FROM node:7-alpine
RUN apk add --no-cache \
openssl \
curl \
supervisor
## Add supervisor config
COPY supervisord.conf /etc/supervisor/supervisord.conf
### Add setup script to create persistent content
RUN mkdir -p /opt/nodepki
COPY setup.sh /opt/nodepki/
WORKDIR /opt/nodepki
RUN curl -L https://github.com/aditosoftware/nodepki/archive/master.tar.gz | tar xz && mv nodepki-master nodepki \
&& curl -L https://github.com/aditosoftware/nodepki-client/archive/master.tar.gz | tar xz && mv nodepki-client-master nodepki-client \
&& curl -L https://github.com/aditosoftware/nodepki-webclient/archive/master.tar.gz | tar xz && mv nodepki-webclient-master nodepki-webclient \
&& cd /opt/nodepki/nodepki-client \
&& npm install \
&& cd /opt/nodepki/nodepki-webclient \
&& npm install \
&& cd /opt/nodepki/nodepki \
&& npm install
RUN adduser -D -g '' nodepki
RUN chown -R nodepki:nodepki /opt/nodepki
USER nodepki
EXPOSE 8080 5000 2560
### Run everything via supervisor
CMD /usr/bin/supervisord -c /etc/supervisor/supervisord.conf