| # Copyright 2014 the Melange authors. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| FROM google/cloud-sdk |
| |
| # Install all packages that Melange depends on |
| RUN apt-get update && apt-get install -y \ |
| git \ |
| iceweasel \ |
| libjpeg-dev \ |
| libpng12-dev \ |
| libwebp-dev \ |
| libxml2-dev \ |
| libxslt-dev \ |
| libyaml-dev \ |
| make \ |
| python \ |
| python-dev \ |
| python-lxml \ |
| python-virtualenv \ |
| xvfb \ |
| zlib1g-dev |
| |
| # Set up and switch to the melange user |
| RUN useradd -m melange |
| USER melange |
| ENV USER melange |
| ENV HOME /home/melange |
| RUN mkdir /home/melange/soc |
| WORKDIR /home/melange/soc |
| |
| # Run bootstrap.py |
| COPY patches/ /home/melange/soc/patches/ |
| COPY \ |
| AUTHORS \ |
| Makefile \ |
| bootstrap.py \ |
| buildout.cfg \ |
| /home/melange/soc/ |
| RUN make initial-setup |
| |
| # Run bin/buildout |
| COPY \ |
| Gruntfile.js \ |
| README.md \ |
| package.json \ |
| setup.py \ |
| pavement.py \ |
| /home/melange/soc/ |
| RUN make buildout |
| |
| # This assumes a checkout of the Melange source code is mounted at /workspace |
| RUN ln -s \ |
| /workspace/scripts/ \ |
| /workspace/tests/ \ |
| /workspace/app/ \ |
| /workspace/pylintrc \ |
| . |
| |
| COPY LICENSE-2.0.txt /home/melange/soc/ |
| |
| # todo lock down admin port too |
| EXPOSE 8080 8000 |
| |