infra/codestorage/hg-repo-sync

Paddy 2015-11-12 Parent:c8b4b952488a

4:32a993adf753 Go to Latest

infra/codestorage/hg-repo-sync/Dockerfile

Fix nested repository permissions. For repositories nested inside folders, fix the permissions on the folders so we can create other repositories inside them. Before, we only fixed the permissions on the repositories themselves; now we also fix the root directory that holds the repository.

History
paddy@0 1 FROM ubuntu:14.04
paddy@0 2 MAINTAINER Paddy <paddy@secondbit.org>
paddy@0 3
paddy@2 4 RUN apt-get update && apt-get install -y python-pip python-dev wget unzip
paddy@2 5 RUN pip install Mercurial==3.5.2
paddy@1 6 RUN groupadd -g 2000 committers
paddy@0 7
paddy@1 8 RUN mkdir -p /mounted/repos
paddy@1 9 RUN chown -R root:committers /mounted/repos
paddy@1 10 RUN chmod 0770 /mounted/repos
paddy@0 11
paddy@1 12 VOLUME /mounted
paddy@0 13
paddy@1 14 RUN mkdir -p /tmp/repos
paddy@1 15 RUN chown -R root:committers /tmp/repos
paddy@1 16 RUN chmod 0770 /tmp/repos
paddy@0 17
paddy@1 18 ADD run.sh /usr/local/bin/helpers/run.sh
paddy@1 19 ADD sleep.sh /usr/local/bin/helpers/sleep.sh
paddy@1 20 ADD pull.sh /usr/local/bin/helpers/pull.sh
paddy@1 21 ADD push.sh /usr/local/bin/helpers/push.sh
paddy@1 22 RUN chmod +x /usr/local/bin/helpers/run.sh
paddy@1 23 RUN chmod +x /usr/local/bin/helpers/sleep.sh
paddy@1 24 RUN chmod +x /usr/local/bin/helpers/pull.sh
paddy@1 25 RUN chmod +x /usr/local/bin/helpers/push.sh
paddy@1 26
paddy@0 27 RUN wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip && unzip google-cloud-sdk.zip && rm google-cloud-sdk.zip
paddy@0 28
paddy@0 29 ENV CLOUDSDK_PYTHON_SITEPACKAGES 1
paddy@0 30 RUN google-cloud-sdk/install.sh --usage-reporting=false --path-update=true --bash-completion=false --rc-path=/.bashrc --disable-installation-options
paddy@0 31 RUN google-cloud-sdk/bin/gcloud --quiet components update pkg-go pkg-python pkg-java preview alpha beta app
paddy@0 32 RUN google-cloud-sdk/bin/gcloud --quiet config set component_manager/disable_update_check true
paddy@0 33 RUN mkdir /.ssh
paddy@0 34 ENV PATH /google-cloud-sdk/bin:$PATH
paddy@0 35 ENV HOME /
paddy@0 36
paddy@1 37 CMD ["/usr/local/bin/helpers/run.sh"]