forked from superdesk/superdesk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (25 loc) · 874 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
# import base image
FROM ubuntu:trusty
# install system-wide dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libfreetype6 libfontconfig nodejs npm nginx git \
&& echo "\ndaemon off;" >> /etc/nginx/nginx.conf \
&& rm /etc/nginx/sites-enabled/default \
&& ln --symbolic /usr/bin/nodejs /usr/bin/node
RUN npm -g install grunt-cli bower
# setup the environment
WORKDIR /opt/superdesk-client/
COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./superdesk_vhost.conf /etc/nginx/sites-enabled/superdesk.conf
EXPOSE 9000
EXPOSE 80
CMD ["sh", "-c" "grunt build && nginx"]
# install app-wide dependencies
COPY ./package.json /opt/superdesk-client/
RUN npm install
COPY ./bower.json /opt/superdesk-client/
COPY ./.bowerrc /opt/superdesk-client/
RUN bower --allow-root install
# copy sources
COPY . /opt/superdesk-client