blob: e74db92f4aae65086edbfbf25e56f6286180852d [file] [log] [blame]
Zack Williams4d0be652016-04-07 13:30:33 -07001# Syndicate Metadata Server
2# See also https://github.com/syndicate-storage/syndicate-docker
3
4FROM ubuntu:14.04.4
5MAINTAINER Zack Williams <zdw@cs.arizona.edu>
6
7# vars
8ENV APT_KEY butler_opencloud_cs_arizona_edu_pub.gpg
9ENV MS_PORT 8080
10ENV GAE_SDK google_appengine_1.9.35.zip
11
12# Prep apt to be able to download over https
13RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --force-yes\
14 apt-transport-https
15
16# copy over and trust https cert
17COPY butler.crt /usr/local/share/ca-certificates
18RUN update-ca-certificates
19
20# Install Syndicate MS
21COPY $APT_KEY /tmp/
22RUN apt-key add /tmp/$APT_KEY
23
24RUN echo "deb https://butler.opencloud.cs.arizona.edu/repos/release/syndicate syndicate main" > /etc/apt/sources.list.d/butler.list
25
26RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --force-yes\
27 syndicate-core \
28 syndicate-ms \
29 wget \
30 unzip
31
32# setup syndicate user
33RUN groupadd -r syndicate && useradd -m -r -g syndicate syndicate
34USER syndicate
35ENV HOME /home/syndicate
36WORKDIR $HOME
37
38# setup GAE
39RUN wget -nv https://storage.googleapis.com/appengine-sdks/featured/$GAE_SDK
40RUN unzip -q $GAE_SDK
41
42# Expose the MS port
43EXPOSE $MS_PORT
44
45# Create a storage location
46RUN mkdir $HOME/datastore
47
48# run the MS under GAE
49CMD $HOME/google_appengine/dev_appserver.py --admin_host=0.0.0.0 --host=0.0.0.0 --storage_path=$HOME/datastore --skip_sdk_update_check=true /usr/src/syndicate/ms
50
51