2015-08-18 22:41:58 +00:00
|
|
|
FROM cloudron/base:0.3.3
|
2015-04-26 19:45:32 +00:00
|
|
|
|
2015-04-29 02:29:12 +00:00
|
|
|
RUN apt-get update && \
|
2015-08-17 19:09:42 +00:00
|
|
|
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-06-24 21:26:43 +00:00
|
|
|
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 && \
|
2015-08-17 18:40:40 +00:00
|
|
|
git clone https://github.com/gogits/gogs.git && \
|
2015-06-24 21:26:43 +00:00
|
|
|
cd gogs && \
|
2015-08-18 21:42:31 +00:00
|
|
|
git reset --hard 47ac579f092cef9128fa0c74798ecaffa2c888f9 && \
|
2015-06-24 21:26:43 +00:00
|
|
|
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-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
|
|
|
|