FROM ubuntu 14 04 RUN locale-gen en_US en_US UTF-8 ENV LANG en_US UTF-

 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
FROM ubuntu:14.04
RUN locale-gen en_US en_US.UTF-8
ENV LANG en_US.UTF-8
RUN apt-get update && apt-get install -y software-properties-common python3 python3-setuptools python3-dev python3-lxml \
libpq-dev memcached git mercurial \
build-essential libjpeg8 libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev libxml2-dev libxslt1-dev unzip \
libcairo2 libpango1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info libcurl4-openssl-dev && apt-get purge python3-pip && easy_install3 pip
RUN add-apt-repository ppa:chris-lea/node.js -y && apt-get update && apt-get install nodejs -y && npm install -g bower grunt-cli
RUN apt-get update && apt-get install ruby-full -y && gem install sass bootstrap-sass
RUN adduser --disabled-password --gecos '' --home /home/r r && adduser r sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
ADD requirements.txt /tmp/
RUN pip3 install -r /tmp/requirements.txt
ENV DJANGO_SETTINGS_MODULE lbb.settings.common
COPY . /opt/webapp
WORKDIR /opt/webapp
ENV DEBUG 0
RUN chown -R r /opt/webapp
USER r
ENV HOME /home/r
RUN cd /opt/webapp/ui/ && sudo npm install && bower install --force --quiet && grunt build
CMD uwsgi --ini /opt/webapp/conf/uwsgi.ini