-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (31 loc) · 1005 Bytes
/
Dockerfile
File metadata and controls
39 lines (31 loc) · 1005 Bytes
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
#
# Powder.js Dockerfile
#
# https://github.com/yamalight/generator-powder
#
# Pull base image
FROM dockerfile/nodejs
# install gulp
RUN npm install -g gulp bower
# use changes to package.json to force Docker not to use the cache
# when we change our application's nodejs dependencies:
ADD docker/package.json /tmp/package.json
RUN cd /tmp && npm install --unsafe-perm
RUN mkdir -p /opt/app && cp -R /tmp/node_modules /opt/app
# use changes to bower.json to force Docker not to use the cache
# when we change our application's bower dependencies:
RUN mkdir -p /tmp/bower
ADD bower.json /tmp/bower/bower.json
RUN cd /tmp/bower && bower install --allow-root
RUN cp -R /tmp/bower/bower_components /opt/app
# copy bootstrap fonts
RUN mkdir -p /opt/app/public
RUN cp -R /tmp/bower/bower_components/bootstrap/fonts /opt/app/public
# Define working directory and bundle source
WORKDIR /opt/app
ADD . /opt/app
RUN gulp build
# Expose port 8080
EXPOSE 8080
# Define default command.
CMD ["node", "app.js"]