forked from sandstorm-io/sandstorm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
70 lines (58 loc) · 2.32 KB
/
Dockerfile.dev
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# 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
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