|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Install Gogs |
|
|
# Install Gogs |
|
|
RUN . /etc/profile.d/gogs.sh \ |
|
|
RUN . /etc/profile.d/gogs.sh \ |
|
|
&& ${GOROOT}/bin/go get -u -tags "cert" github.com/gogits/gogs \ |
|
|
|
|
|
&& cd $GOPATH/src/github.com/gogits/gogs \ |
|
|
|
|
|
|
|
|
&& ${GOROOT}/bin/go get -u -tags "cert" github.com/gogs/gogs \ |
|
|
|
|
|
&& cd $GOPATH/src/github.com/gogs/gogs \ |
|
|
&& go build -tags "cert" |
|
|
&& go build -tags "cert" |
|
|
|
|
|
|
|
|
# TODO: |
|
|
# TODO: |
|
|
# clean stuff |
|
|
# clean stuff |
|
|
# https://github.com/gogits/gogs/blob/master/docker/finalize.sh |
|
|
|
|
|
|
|
|
# https://github.com/gogs/gogs/blob/master/docker/finalize.sh |
|
|
|
|
|
|
|
|
# Clean stuff |
|
|
# Clean stuff |
|
|
RUN rm -r $HOME/go/src/github.com/gogits/gogs/.git |
|
|
|
|
|
|
|
|
RUN rm -r $HOME/go/src/github.com/gogs/gogs/.git |
|
|
#RUN rm -r $HOME/local |
|
|
#RUN rm -r $HOME/local |
|
|
|
|
|
|
|
|
# Configuration |
|
|
# Configuration |
|
|
# $HOME doesn't work with COPY |
|
|
# $HOME doesn't work with COPY |
|
|
RUN mkdir -p ${GIT_HOME}/go/src/github.com/gogits/gogs/custom/conf |
|
|
|
|
|
COPY app.ini ${GIT_HOME}/go/src/github.com/gogits/gogs/custom/conf/ |
|
|
|
|
|
|
|
|
RUN mkdir -p ${GIT_HOME}/go/src/github.com/gogs/gogs/custom/conf |
|
|
|
|
|
COPY app.ini ${GIT_HOME}/go/src/github.com/gogs/gogs/custom/conf/ |
|
|
# LDAP |
|
|
# LDAP |
|
|
RUN mkdir -p ${GIT_HOME}/go/src/github.com/gogits/gogs/custom/conf/auth.d |
|
|
|
|
|
COPY ldap.conf ${GIT_HOME}/go/src/github.com/gogits/gogs/custom/conf/auth.d/ |
|
|
|
|
|
|
|
|
RUN mkdir -p ${GIT_HOME}/go/src/github.com/gogs/gogs/custom/conf/auth.d |
|
|
|
|
|
COPY ldap.conf ${GIT_HOME}/go/src/github.com/gogs/gogs/custom/conf/auth.d/ |
|
|
|
|
|
|
|
|
# ############## USER root ######################## |
|
|
# ############## USER root ######################## |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh |
|
|
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh |
|
|
|
|
|
|
|
|
#ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] |
|
|
#ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] |
|
|
#CMD gosu git ${GOPATH}/src/github.com/gogits/gogs/gogs web |
|
|
|
|
|
|
|
|
#CMD gosu git ${GOPATH}/src/github.com/gogs/gogs/gogs web |
|
|
ENTRYPOINT [] |
|
|
ENTRYPOINT [] |
|
|
CMD ["/usr/local/bin/docker-entrypoint.sh"] |
|
|
CMD ["/usr/local/bin/docker-entrypoint.sh"] |