mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2025-09-01 15:24:59 +00:00
use git instead of cloudron as user
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -6,27 +6,32 @@ RUN apt-get update && \
|
||||
|
||||
ADD supervisor/ /etc/supervisor/conf.d/
|
||||
|
||||
RUN mkdir -p /home/cloudron/gogs
|
||||
RUN adduser --disabled-login --gecos 'Gogs' git
|
||||
# by default, git account is created as inactive which prevents login via openssh
|
||||
# https://github.com/gitlabhq/gitlabhq/issues/5304
|
||||
RUN passwd -d git
|
||||
|
||||
RUN mkdir -p /home/git/gogs
|
||||
## TODO: use redis as well
|
||||
RUN cd /home/cloudron/gogs && \
|
||||
RUN cd /home/git/gogs && \
|
||||
curl -L https://github.com/gogits/gogs/releases/download/v0.8.25/linux_amd64.tar.gz | tar zxvf - --strip-components 1
|
||||
|
||||
# setup config paths
|
||||
ADD app.ini.template /home/cloudron/app.ini.template
|
||||
RUN mkdir -p /run/gogs && chown -R cloudron:cloudron /run/gogs
|
||||
ADD app.ini.template /home/git/app.ini.template
|
||||
RUN mkdir -p /run/gogs && chown -R git:git /run/gogs
|
||||
|
||||
# setup log paths
|
||||
RUN mkdir -p /run/gogs && chown -R cloudron:cloudron /run/gogs
|
||||
RUN mkdir -p /run/gogs && chown -R git:git /run/gogs
|
||||
RUN sed -e 's,^logfile=.*$,logfile=/run/gogs/supervisord.log,' -i /etc/supervisor/supervisord.conf
|
||||
|
||||
RUN ln -s /app/data/ssh /home/cloudron/.ssh
|
||||
RUN ln -s /app/data/gitconfig /home/cloudron/.gitconfig
|
||||
RUN ln -s /app/data/ssh /home/git/.ssh
|
||||
RUN ln -s /app/data/gitconfig /home/git/.gitconfig
|
||||
|
||||
ADD start.sh /home/cloudron/start.sh
|
||||
ADD start.sh /home/git/start.sh
|
||||
|
||||
# disable pam authentication for sshd
|
||||
RUN sed -e 's/UsePAM yes/UsePAM no/' -e 's/UsePrivilegeSeparation yes/UsePrivilegeSeparation no/' -i /etc/ssh/sshd_config
|
||||
RUN echo "UseDNS no" >> /etc/ssh/sshd_config
|
||||
|
||||
CMD [ "/home/cloudron/start.sh" ]
|
||||
CMD [ "/home/git/start.sh" ]
|
||||
|
||||
|
Reference in New Issue
Block a user