You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.9 KiB

10 years ago
  1. FROM stackbrew/ubuntu:13.10
  2. MAINTAINER Meaglith Ma <genedna@gmail.com> (@genedna)
  3. ENV DEBIAN_FRONTEND noninteractive
  4. 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
  5. RUN mkdir -p /go
  6. ENV PATH /usr/local/go/bin:/go/bin:$PATH
  7. ENV GOROOT /usr/local/go
  8. ENV GOPATH /go
  9. RUN apt-get update && apt-get install --yes --force-yes curl git mercurial zip wget ca-certificates build-essential
  10. RUN curl -s http://docker.u.qiniudn.com/go1.2.1.src.tar.gz | tar -v -C /usr/local -xz
  11. RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1
  12. # You may need a proxy, if github is very slow.
  13. #RUN http_proxy=106.187.38.45:3128 go get -u github.com/gogits/gogs
  14. RUN go get -u github.com/gogits/gogs
  15. RUN cd $GOPATH/src/github.com/gogits/gogs && go build
  16. # Clean all the unused packages
  17. RUN apt-get autoremove -y
  18. RUN apt-get clean all
  19. # Add the deploy script to the docker image and assign execution permission to it.
  20. ADD ./deploy.sh /
  21. RUN chmod +x deploy.sh
  22. EXPOSE 3000
  23. CMD /deploy.sh