mirror of
https://github.com/go-gitea/gitea
synced 2025-09-28 03:28:13 +00:00
Add the auto build scripts for deplying gogs with Docker.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
FROM stackbrew/ubuntu:13.10
|
||||
MAINTAINER Meaglith Ma <genedna@gmail.com> (@genedna)
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ saucy main restricted" > /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates main restricted" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security main restricted" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security multiverse" >> /etc/apt/sources.list
|
||||
|
||||
RUN mkdir -p /go
|
||||
@@ -13,9 +15,12 @@ RUN apt-get update && apt-get install --yes --force-yes curl git mercurial zip w
|
||||
RUN curl -s http://docker.u.qiniudn.com/go1.2.1.src.tar.gz | tar -v -C /usr/local -xz
|
||||
RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1
|
||||
|
||||
RUN http_proxy=106.187.38.45:3128 go get -u github.com/gogits/gogs
|
||||
# You may need a proxy, if github is very slow.
|
||||
#RUN http_proxy=106.187.38.45:3128 go get -u github.com/gogits/gogs
|
||||
RUN go get -u github.com/gogits/gogs
|
||||
RUN cd $GOPATH/src/github.com/gogits/gogs && go build
|
||||
|
||||
# Clean all the unused packages
|
||||
RUN apt-get autoremove -y
|
||||
RUN apt-get clean all
|
||||
|
||||
@@ -24,5 +29,5 @@ ADD ./deploy.sh /
|
||||
RUN chmod +x deploy.sh
|
||||
|
||||
EXPOSE 3000
|
||||
CMD [/deploy.sh]
|
||||
CMD ["$GOPATH/src/github.com/gogits/gogs/gogs web"]
|
||||
|
||||
CMD /deploy.sh
|
||||
|
Reference in New Issue
Block a user