gitea-app/Dockerfile
Girish Ramakrishnan c79129bc6a Fix LDAP crash
2015-08-18 12:14:22 -07:00

34 lines
1.2 KiB
Docker

FROM cloudron/base:0.3.2
RUN apt-get update && \
apt-get install -y openssh-server && \
rm -r /var/cache/apt /var/lib/apt/lists
ADD supervisor/ /etc/supervisor/conf.d/
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 && \
git reset --hard 6235bd1fe9ed15c9a889f72e4fe2880189963306 && \
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/. && \
cp -r ${GOPATH}/src/github.com/gogits/gogs/public/ /home/cloudron/gogs/. && \
rm -rf ${GOPATH}
ADD app.ini.template /home/cloudron/app.ini.template
ADD start.sh /home/cloudron/start.sh
# disable pam authentication for sshd
RUN sed 's/UsePAM yes/UsePAM no/' -i /etc/ssh/sshd_config
RUN sed 's/UsePrivilegeSeparation yes/UsePrivilegeSeparation no/' -i /etc/ssh/sshd_config
RUN echo "UseDNS no" >> /etc/ssh/sshd_config
CMD [ "/home/cloudron/start.sh" ]