2015-04-26 19:45:32 +00:00
|
|
|
FROM girish/base:0.2.0
|
|
|
|
|
2015-04-29 02:29:12 +00:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y openssh-server && \
|
|
|
|
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-06-23 17:27:40 +00:00
|
|
|
ENV GOPATH /home/cloudron
|
2015-06-23 17:51:55 +00:00
|
|
|
RUN mkdir -p /home/cloudron/gogs/
|
2015-06-23 17:27:40 +00:00
|
|
|
|
|
|
|
## TODO: use redis as well
|
|
|
|
RUN mkdir -p ${GOPATH}/src/github.com/gogits && \
|
|
|
|
cd ${GOPATH}/src/github.com/gogits && \
|
|
|
|
git clone https://github.com/cloudron-io/gogs.git && \
|
|
|
|
cd gogs && \
|
2015-06-23 17:51:55 +00:00
|
|
|
go get ./... && \
|
|
|
|
go build && \
|
2015-06-23 17:27:40 +00:00
|
|
|
go install && \
|
2015-06-23 18:03:45 +00:00
|
|
|
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/.
|
2015-04-26 19:45:32 +00:00
|
|
|
|
2015-04-29 00:12:16 +00:00
|
|
|
ADD app.ini.template /home/cloudron/app.ini.template
|
|
|
|
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 '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
|
|
|
|
|
2015-04-29 00:12:16 +00:00
|
|
|
CMD [ "/home/cloudron/start.sh" ]
|
2015-04-26 19:45:32 +00:00
|
|
|
|