-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (26 loc) · 913 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (26 loc) · 913 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
From ubuntu:trusty
MAINTAINER Elliott Ye
# Set noninteractive mode for apt-get
ENV DEBIAN_FRONTEND noninteractive
# Update
RUN apt-get update
### Start editing ###
# Install package here for cache
RUN apt-get -y install supervisor software-properties-common logrotate curl
RUN curl -sL https://deb.nodesource.com/setup | bash - \
&& apt-get -y install nodejs python build-essential
RUN add-apt-repository ppa:nginx/stable && apt-get update \
&& apt-get -y install nginx-full \
&& echo "daemon off;" >> /etc/nginx/nginx.conf \
&& rm /etc/nginx/sites-enabled/default
# Add files
#supervisor
ADD nginx-nodejs.conf /etc/supervisor/conf.d/nginx-nodejs.conf
#nodejs
ONBUILD ADD src/package.json /src/package.json
ONBUILD RUN cd /src && npm install
ONBUILD ADD src /src
#nginx
ONBUILD ADD nginx/sites-enabled /etc/nginx/sites-enabled
# Run
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]