gitea-app/Dockerfile

46 lines
1.5 KiB
Docker
Raw Normal View History

2015-11-24 18:35:51 +00:00
FROM cloudron/base:0.8.0
2015-04-26 19:45:32 +00:00
2015-04-29 02:29:12 +00:00
RUN apt-get update && \
apt-get install -y openssh-server && \
2015-04-29 02:29:12 +00:00
rm -r /var/cache/apt /var/lib/apt/lists
2015-04-29 00:12:16 +00:00
2015-04-29 02:29:12 +00:00
ADD supervisor/ /etc/supervisor/conf.d/
2015-04-29 00:12:16 +00:00
2015-10-13 22:27:09 +00:00
ENV GOROOT /usr/local/go-1.5.1
ENV PATH $GOROOT/bin:$PATH
ENV GOPATH /home/cloudron/gows
RUN mkdir -p /home/cloudron/gows /home/cloudron/gogs
## TODO: use redis as well
RUN mkdir -p ${GOPATH}/src/github.com/gogits && \
cd ${GOPATH}/src/github.com/gogits && \
git clone https://github.com/gogits/gogs.git && \
cd gogs && \
2015-11-24 18:35:51 +00:00
git reset --hard v0.7.19 && \
go get ./... && \
go build && \
go install && \
mv ${GOPATH}/bin/gogs /home/cloudron/gogs/ && \
cp -r ${GOPATH}/src/github.com/gogits/gogs/templates/ /home/cloudron/gogs/. && \
2015-06-24 22:46:44 +00:00
cp -r ${GOPATH}/src/github.com/gogits/gogs/public/ /home/cloudron/gogs/. && \
rm -rf ${GOPATH}
2015-04-26 19:45:32 +00:00
2015-10-13 22:27:09 +00:00
# setup config paths
2015-04-29 00:12:16 +00:00
ADD app.ini.template /home/cloudron/app.ini.template
2015-10-13 22:27:09 +00:00
RUN mkdir -p /run/gogs && chown -R cloudron:cloudron /run/gogs
# setup log paths
RUN mkdir -p /run/gogs && chown -R cloudron:cloudron /run/gogs
RUN sed -e 's,^logfile=.*$,logfile=/run/gogs/supervisord.log,' -i /etc/supervisor/supervisord.conf
2015-10-13 22:27:09 +00:00
2015-10-13 23:12:06 +00:00
RUN ln -s /app/data/ssh /home/cloudron/.ssh
2015-10-14 07:19:55 +00:00
RUN ln -s /app/data/gitconfig /home/cloudron/.gitconfig
2015-10-13 23:12:06 +00:00
2015-04-29 00:12:16 +00:00
ADD start.sh /home/cloudron/start.sh
2015-04-26 19:45:32 +00:00
2015-04-29 02:29:12 +00:00
# disable pam authentication for sshd
RUN sed -e 's/UsePAM yes/UsePAM no/' -e 's/UsePrivilegeSeparation yes/UsePrivilegeSeparation no/' -i /etc/ssh/sshd_config
2015-04-29 02:29:12 +00:00
RUN echo "UseDNS no" >> /etc/ssh/sshd_config
2015-04-29 00:12:16 +00:00
CMD [ "/home/cloudron/start.sh" ]
2015-04-26 19:45:32 +00:00