Skip to content
This repository was archived by the owner on Feb 11, 2020. It is now read-only.

Commit 8ccad2f

Browse files
committed
Improved Dockerfile.
1 parent f5ee283 commit 8ccad2f

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

Dockerfile

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
# Mosca
22
#
3-
# VERSION 0.0.4
3+
# VERSION 0.1.0
44

5-
FROM dockerfile/nodejs
5+
FROM node:0.10
66
MAINTAINER Matteo Collina <hello@matteocollina.com>
77

8-
# install tools for building binary addons
9-
RUN apt-get -y update
10-
RUN apt-get -y install build-essential libssl-dev curl python
8+
RUN mkdir -p /usr/src/app
9+
WORKDIR /usr/src/app/
1110

12-
RUN mkdir /db
11+
COPY ./ /usr/src/app/
1312

14-
ADD ./ /src
15-
16-
RUN cd /src; rm -rf node_modules/; npm install --unsafe-perm
13+
RUN npm install --unsafe-perm --production
1714

1815
EXPOSE 80
1916
EXPOSE 1883
2017

21-
ENTRYPOINT ["/src/bin/mosca", "-d", "/db", "--http-port", "80", "--http-bundle", "-v"]
18+
ENTRYPOINT ["/usr/src/app/bin/mosca", "-d", "/db", "--http-port", "80", "--http-bundle", "-v"]

0 commit comments

Comments
 (0)