# Sandstorm - Personal Cloud Sandbox # Copyright (c) 2014 Sandstorm Development Group, Inc. and contributors # All rights reserved. # # 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. # This Dockerfile will first fetch all of Sandstorm's dependencies, and then # procede to build Sandstorm within the image. This file isn't used for much # at the moment, but it will eventually be hooked up in a regression test. # # Docker doesn't allow multiple Dockerfiles yet. For now, you have to do the # following: # mv Dockerfile{,.orig} && ln -s Dockerfile{.dev,} # docker build -t sandstorm . # Use Ubuntu Trusty as our base FROM ubuntu:14.04 RUN echo "APT::Get::Assume-Yes true;" >>/etc/apt/apt.conf # Install sandstorm dependencies RUN apt-get update RUN apt-get install pkg-config git subversion build-essential autoconf libtool RUN apt-get install libcap-dev xz-utils clang-3.4 RUN apt-get install curl strace zip imagemagick RUN apt-get install default-jre-headless RUN apt-get install discount RUN curl https://install.meteor.com | /bin/sh RUN adduser --disabled-password --gecos "" sandstorm USER sandstorm ENV HOME /home/sandstorm ENV USER sandstorm RUN meteor update USER root ADD . /opt/src RUN rm -rf /opt/src/shell/packages/*/.build* && rm -rf /opt/src/shell/packages/*/.npm RUN rm -rf /opt/src/shell-build RUN cd /opt/src && make update-deps && make fast && chmod 555 ./install.sh sandstorm-0-fast.tar.xz USER sandstorm RUN cd /opt/src && ./install.sh -d -u sandstorm-0-fast.tar.xz ENV HOME /home/sandstorm ENV USER sandstorm RUN echo 'SERVER_USER=sandstorm\n\ PORT=6080\n\ MONGO_PORT=6081\n\ BIND_IP=0.0.0.0\n\ BASE_URL=http://local.sandstorm.io:6080\n\ WILDCARD_HOST=*.local.sandstorm.io:6080\n\ MAIL_URL=\n' > $HOME/sandstorm/sandstorm.conf RUN echo 'export PATH=$PATH:$HOME/sandstorm' >> $HOME/.bashrc EXPOSE 6080 CMD /home/sandstorm/sandstorm/sandstorm start && sleep infinity