| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 | FROM buildpack-deps:trusty-scm# This part is taken from the official docker image --------------------RUN apt-get update && apt-get install -y \		build-essential --no-install-recommendsENV GOLANG_VERSION 1.3RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \		| tar -v -C /usr/src -xzRUN cd /usr/src/go/src && ./make.bash --no-clean 2>&1ENV PATH /usr/src/go/bin:$PATHRUN mkdir -p /go/src /go/bin && chmod -R 777 /goENV GOPATH /goENV PATH /go/bin:$PATHWORKDIR /go# ----------------------------------------------------------------------RUN useradd -m gitENV GOGS_PATH $GOPATH/src/github.com/gogits/gogsENV GOGS_CUSTOM_CONF_PATH $GOGS_PATH/custom/confENV GOGS_CUSTOM_CONF $GOGS_CUSTOM_CONF_PATH/app.iniRUN go get -u -d github.com/gogits/gogs# WORKDIR $GOGS_PATHWORKDIR /go/src/github.com/gogits/gogsRUN go build github.com/gogits/gogsRUN chown -R git $GOGS_PATHADD init_gogs.sh /tmp/RUN chown git /tmp/init_gogs.shRUN chmod +x /tmp/init_gogs.shUSER gitENV HOME /home/gitENV USER gitENV PATH $GOGS_PATH:$PATHRUN git config --global user.name "GoGS" && git config --global user.email "gogitservice@gmail.com"ENTRYPOINT ["/tmp/init_gogs.sh"]CMD ["gogs", "web"]
 |