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