Skip to content

Commit

Permalink
Clean up the Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
edgester committed Nov 29, 2013
1 parent b4eaeb5 commit 2716924
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#
# VERSION 0.0.1

#FROM ubuntu
FROM edgester/ubuntu-jdk
FROM ubuntu

MAINTAINER Jason W. Edgecombe <jason@rampaginggek.com>

Expand All @@ -13,25 +12,24 @@ 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 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 DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jre-headless sudo git-core supervisor vim-tiny
RUN mkdir -p /var/log/supervisor

ADD gerrit.war /tmp/gerrit.war
ADD http://gerrit-releases.storage.googleapis.com/gerrit-2.7.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
RUN rm -f /etc/apt/apt.conf.d/01proxy

USER gerrit
RUN java -jar $GERRIT_WAR init --batch -d $GERRIT_HOME
Expand All @@ -41,5 +39,4 @@ ADD gerrit.config /home/gerrit/gerrit/etc/gerrit.config

USER root
EXPOSE 8080 29418
#CMD ["/usr/bin/supervisord"]
CMD ["/usr/sbin/service","supervisor","start"]
CMD ["/usr/sbin/service","supervisor","start"]

0 comments on commit 2716924

Please sign in to comment.