forked from loowid/loowid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (21 loc) · 823 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
#
# Build Loowid Image
#
FROM node:0.10.33
MAINTAINER loowid <[email protected]>
# Download and install loowid source
RUN mkdir /opt/loowid
# Just copy the package file in so that builds are well cached and it doesn't rebuild everything
COPY package.json /opt/loowid/
RUN cd /opt/loowid && npm install --production
COPY . /opt/loowid
# Create self signed certificate
RUN openssl genrsa -out /opt/loowid/private.pem 1024 && \
openssl req -new -key /opt/loowid/private.pem -out /opt/loowid/public.csr -subj "/C=ES/ST=None/L=None/O=None/OU=None/CN=localhost" && \
openssl x509 -req -days 366 -in /opt/loowid/public.csr -signkey /opt/loowid/private.pem -out /opt/loowid/public.pem
# Expose https port from the container to the host
EXPOSE 443
# Work directory
WORKDIR /opt/loowid
# Run server
CMD npm start