mirror of
https://git.cloudron.io/cloudron/gitea-app.git
synced 2024-12-23 07:36:39 +00:00
37 lines
1.1 KiB
Docker
37 lines
1.1 KiB
Docker
FROM cloudron/base:2.0.0@sha256:f9fea80513aa7c92fe2e7bf3978b54c8ac5222f47a9a32a7f8833edf0eb5a4f4
|
|
|
|
ARG VERSION=1.12.0
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y openssh-server git && \
|
|
rm -rf /etc/ssh_host_* && \
|
|
rm -r /var/cache/apt /var/lib/apt/lists
|
|
|
|
ADD supervisor/ /etc/supervisor/conf.d/
|
|
|
|
RUN adduser --disabled-login --gecos 'Gitea' 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/gitea
|
|
WORKDIR /home/git
|
|
RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \
|
|
&& chmod +x /home/git/gitea/gitea
|
|
|
|
# setup config paths
|
|
ADD app.ini.template /home/git/app.ini.template
|
|
|
|
# setup log paths
|
|
RUN mkdir -p /run/gitea && chown -R git:git /run/gitea
|
|
RUN sed -e 's,^logfile=.*$,logfile=/run/gitea/supervisord.log,' -i /etc/supervisor/supervisord.conf
|
|
|
|
RUN ln -s /app/data/ssh /home/git/.ssh
|
|
RUN ln -s /app/data/gitconfig /home/git/.gitconfig
|
|
|
|
ADD start.sh /home/git/start.sh
|
|
|
|
COPY sshd_config /etc/ssh/sshd_config
|
|
|
|
CMD [ "/home/git/start.sh" ]
|
|
|