-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import all of the build files and scripts
- Loading branch information
Showing
7 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# gerrit | ||
# | ||
# VERSION 0.0.1 | ||
|
||
#FROM ubuntu | ||
FROM edgester/ubuntu-jdk | ||
|
||
MAINTAINER Jason W. Edgecombe <[email protected]> | ||
|
||
ENV GERRIT_HOME /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 | ||
|
||
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 useradd -m $GERRIT_USER | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jre-headless sudo git-core net-tools supervisor vim-tiny | ||
RUN mkdir -p /var/run/sshd | ||
RUN mkdir -p /var/log/supervisor | ||
|
||
ADD gerrit.war /tmp/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 | ||
|
||
USER gerrit | ||
RUN java -jar $GERRIT_WAR init --batch -d $GERRIT_HOME | ||
|
||
# clobber the gerrit config. set the URL to localhost:8080 | ||
ADD gerrit.config /home/gerrit/gerrit/etc/gerrit.config | ||
|
||
USER root | ||
EXPOSE 8080 29418 | ||
#CMD ["/usr/bin/supervisord"] | ||
CMD ["/usr/sbin/service","supervisor","start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
docker rmi edgester/gerrit | ||
docker build -rm -t edgester/gerrit . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[gerrit] | ||
basePath = git | ||
canonicalWebUrl = http://localhost:8080/ | ||
[database] | ||
type = H2 | ||
database = db/ReviewDB | ||
[auth] | ||
type = OPENID | ||
[sendemail] | ||
smtpServer = localhost | ||
[container] | ||
user = gerrit | ||
javaHome = /usr/lib/jvm/java-6-openjdk-amd64/jre | ||
[sshd] | ||
listenAddress = *:29418 | ||
[httpd] | ||
listenUrl = http://*:8080/ | ||
[cache] | ||
directory = cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
docker run -p 127.0.0.1:8080:8080 -p 127.0.0.1:29418:29418 edgester/gerrit $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
docker run -p 127.0.0.1:8080:8080 -p 127.0.0.1:29418:29418 -d edgester/gerrit $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
docker run -p 127.0.0.1:8080:8080 -p 127.0.0.1:29418:29418 -i -t edgester/gerrit $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[program:gerrit] | ||
command=/bin/bash -c "/home/gerrit/gerrit/bin/gerrit.sh start" |