mirror of https://github.com/gogits/gogs.git
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.
26 lines
558 B
26 lines
558 B
11 years ago
|
FROM golang:latest
|
||
|
|
||
|
RUN useradd -m git
|
||
|
|
||
|
ENV GOGS_PATH $GOPATH/src/github.com/gogits/gogs
|
||
|
ENV GOGS_CUSTOM_CONF_PATH $GOGS_PATH/custom/conf
|
||
|
ENV GOGS_CUSTOM_CONF $GOGS_CUSTOM_CONF_PATH/app.ini
|
||
|
|
||
|
RUN go get github.com/gogits/gogs
|
||
|
# WORKDIR $GOGS_PATH
|
||
|
WORKDIR /go/src/github.com/gogits/gogs
|
||
|
RUN go build github.com/gogits/gogs
|
||
|
RUN chown -R git $GOGS_PATH
|
||
|
|
||
|
ADD init_gogs.sh /tmp/
|
||
|
RUN chown git /tmp/init_gogs.sh
|
||
|
RUN chmod +x /tmp/init_gogs.sh
|
||
|
|
||
|
USER git
|
||
|
ENV HOME /home/git
|
||
|
ENV USER git
|
||
|
ENV PATH $GOGS_PATH:$PATH
|
||
|
|
||
|
ENTRYPOINT ["/tmp/init_gogs.sh"]
|
||
|
CMD ["gogs", "web"]
|