-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
38 lines (23 loc) · 877 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
29
30
31
32
33
34
35
36
37
38
FROM node:0.12.7-wheezy
MAINTAINER YeTing "[email protected]"
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
RUN echo "deb http://nginx.org/packages/mainline/debian/ wheezy nginx" >> /etc/apt/sources.list
ENV NGINX_VERSION 1.7.12-1~wheezy
RUN apt-get update && \
apt-get install -y ca-certificates nginx && \
rm -rf /var/lib/apt/lists/*
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 80
RUN npm install -g bower gulp grunt
WORKDIR /app
COPY ./package.json /app/
COPY ./bower.json /app/
RUN npm install && bower install --allow-root
COPY . /app/
RUN grunt build
RUN cp -R /app/dist/* /usr/share/nginx/html
COPY /nginx.conf /etc/nginx/nginx.conf
RUN rm -rf /app
CMD ["nginx", "-g", "daemon off;"]