infra/codestorage/hg-repo-sync

Paddy 2015-08-17 Child:cc08c8ed2128

0:d8c86bc750ad Go to Latest

infra/codestorage/hg-repo-sync/Dockerfile

First commit. This contains the basic implementation of hg-repo-sync, which is only useful when you want to do a constant two-way sync every few minutes to Google Cloud Storage. It also hardcodes more than it should. But it's running on code.secondbit.org without issue, so it should probably be preserved.

History
1 FROM ubuntu:14.04
2 MAINTAINER Paddy <paddy@secondbit.org>
4 RUN apt-get update && apt-get install -y Mercurial wget unzip
5 RUN adduser --disabled-password --gecos "" -uid 2000 hg
7 RUN mkdir -p /scratch
8 RUN mkdir -p /current
10 VOLUME /current
11 VOLUME /scratch
13 ADD run.sh /etc/run.sh
14 RUN chmod +x /etc/run.sh
16 ADD hgrc /etc/mercurial/hgrc
17 RUN wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip && unzip google-cloud-sdk.zip && rm google-cloud-sdk.zip
19 ENV CLOUDSDK_PYTHON_SITEPACKAGES 1
20 RUN google-cloud-sdk/install.sh --usage-reporting=false --path-update=true --bash-completion=false --rc-path=/.bashrc --disable-installation-options
21 RUN google-cloud-sdk/bin/gcloud --quiet components update pkg-go pkg-python pkg-java preview alpha beta app
22 RUN google-cloud-sdk/bin/gcloud --quiet config set component_manager/disable_update_check true
23 RUN mkdir /.ssh
24 ENV PATH /google-cloud-sdk/bin:$PATH
25 ENV HOME /
27 ENTRYPOINT ["/etc/run.sh"]