use gogs binary

This commit is contained in:
Girish Ramakrishnan 2016-02-01 11:57:53 -08:00
parent 7c5bd371ac
commit d6be67fe67
1 changed files with 3 additions and 16 deletions

View File

@ -6,23 +6,10 @@ RUN apt-get update && \
ADD supervisor/ /etc/supervisor/conf.d/ ADD supervisor/ /etc/supervisor/conf.d/
ENV GOROOT /usr/local/go-1.5.1 RUN mkdir -p /home/cloudron/gogs
ENV PATH $GOROOT/bin:$PATH
ENV GOPATH /home/cloudron/gows
RUN mkdir -p /home/cloudron/gows /home/cloudron/gogs
## TODO: use redis as well ## TODO: use redis as well
RUN mkdir -p ${GOPATH}/src/github.com/gogits && \ RUN cd /home/cloudron/gogs && \
cd ${GOPATH}/src/github.com/gogits && \ curl -L https://github.com/gogits/gogs/releases/download/v0.8.25/linux_amd64.tar.gz | tar zxvf - --strip-components 1
git clone https://github.com/gogits/gogs.git && \
cd gogs && \
git reset --hard b2fb7e3fd27f360e65ee60b93cad7d5d9832f818 && \
go get ./... && \
go build && \
go install && \
mv ${GOPATH}/bin/gogs /home/cloudron/gogs/ && \
cp -r ${GOPATH}/src/github.com/gogits/gogs/templates/ /home/cloudron/gogs/. && \
cp -r ${GOPATH}/src/github.com/gogits/gogs/public/ /home/cloudron/gogs/. && \
rm -rf ${GOPATH}
# setup config paths # setup config paths
ADD app.ini.template /home/cloudron/app.ini.template ADD app.ini.template /home/cloudron/app.ini.template