Dockerfile 1.8 KB

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