Skip to content

Commit

Permalink
gerrit 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Aug 29, 2014
1 parent 2716924 commit 5627384
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 21 deletions.
38 changes: 19 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# gerrit
#
# VERSION 0.0.1
# VERSION 0.0.2

FROM ubuntu
FROM ubuntu:14.04

MAINTAINER Jason W. Edgecombe <[email protected]>

ENV GERRIT_HOME /home/gerrit/gerrit
ENV GERRIT_HOME /home/gerrit
ENV GERRIT_ROOT /home/gerrit/gerrit
ENV GERRIT_USER gerrit
ENV GERRIT_WAR /home/gerrit/gerrit.war

RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list

# comment out the following line if you don't have a local deb proxy
RUN IPADDR=$( ip route | grep default | awk '{print $3}' ) ;echo "Acquire::http { Proxy \"http://$IPADDR:3142\"; };"| tee -a /etc/apt/apt.conf.d/01proxy

RUN apt-get update
RUN apt-get upgrade
RUN \
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get install -y sudo vim-tiny git && \
DEBIAN_FRONTEND=noninteractive apt-get install -y supervisor && \
DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-7-jre-headless

RUN useradd -m $GERRIT_USER
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jre-headless sudo git-core supervisor vim-tiny
RUN mkdir -p $GERRIT_HOME
RUN chown ${GERRIT_USER}:${GERRIT_USER} $GERRIT_HOME

RUN mkdir -p /var/log/supervisor

ADD http://gerrit-releases.storage.googleapis.com/gerrit-2.7.war /tmp/gerrit.war
ADD http://gerrit-releases.storage.googleapis.com/gerrit-2.9.war $GERRIT_WAR
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf

RUN mkdir -p $GERRIT_HOME
RUN chown ${GERRIT_USER}.${GERRIT_USER} $GERRIT_HOME
RUN mv /tmp/gerrit.war $GERRIT_WAR
RUN chown -R ${GERRIT_USER}.${GERRIT_USER} $GERRIT_HOME
RUN rm -f /etc/apt/apt.conf.d/01proxy
RUN chown -R ${GERRIT_USER}:${GERRIT_USER} $GERRIT_HOME

USER gerrit
RUN java -jar $GERRIT_WAR init --batch -d $GERRIT_HOME
CMD ["/usr/bin/ls","/home/gerrit"]
RUN java -jar $GERRIT_WAR init --batch -d $GERRIT_ROOT
RUN chown -R ${GERRIT_USER}:${GERRIT_USER} $GERRIT_ROOT

# clobber the gerrit config. set the URL to localhost:8080
ADD gerrit.config /home/gerrit/gerrit/etc/gerrit.config

USER root
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@ docker-gerrit
=============

Build a Docker container with the gerrit code review system

To build the image:

./build

To run it:

./run
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
docker rmi edgester/gerrit
docker build -rm -t edgester/gerrit .
docker build --rm -t edgester/gerrit .
2 changes: 1 addition & 1 deletion gerrit.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
smtpServer = localhost
[container]
user = gerrit
javaHome = /usr/lib/jvm/java-6-openjdk-amd64/jre
javaHome = /usr/lib/jvm/java-7-openjdk-amd64/jre
[sshd]
listenAddress = *:29418
[httpd]
Expand Down

0 comments on commit 5627384

Please sign in to comment.