gitea-app/Dockerfile

43 lines
1.2 KiB
Docker
Raw Permalink Normal View History

2022-12-23 10:14:36 +00:00
FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df
2017-06-02 08:32:24 +00:00
2015-04-29 02:29:12 +00:00
RUN apt-get update && \
2021-12-03 18:05:28 +00:00
apt-get install -y openssh-server git asciidoctor pandoc && \
rm -rf /etc/ssh_host_* && \
2015-04-29 02:29:12 +00:00
rm -r /var/cache/apt /var/lib/apt/lists
RUN pip3 install jupyter
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
2017-06-02 08:32:24 +00:00
RUN adduser --disabled-login --gecos 'Gitea' git
2016-02-22 02:52:08 +00:00
# by default, git account is created as inactive which prevents login via openssh
# https://github.com/gitlabhq/gitlabhq/issues/5304
RUN passwd -d git
2017-06-02 08:32:24 +00:00
RUN mkdir -p /home/git/gitea
WORKDIR /home/git
2021-03-04 16:08:50 +00:00
# for autosign feature
ENV GNUPGHOME="/app/data/gnupg"
2023-07-29 13:40:04 +00:00
ARG VERSION=1.20.2
2021-03-04 16:08:50 +00:00
2019-08-15 11:37:27 +00:00
RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \
2017-06-02 08:32:24 +00:00
&& chmod +x /home/git/gitea/gitea
2015-04-26 19:45:32 +00:00
2015-10-13 22:27:09 +00:00
# setup config paths
2016-02-22 02:52:08 +00:00
ADD app.ini.template /home/git/app.ini.template
2015-10-13 22:27:09 +00:00
# setup log paths
2017-06-02 08:32:24 +00:00
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
2015-10-13 22:27:09 +00:00
2016-02-22 02:52:08 +00:00
RUN ln -s /app/data/ssh /home/git/.ssh
RUN ln -s /app/data/gitconfig /home/git/.gitconfig
2015-10-13 23:12:06 +00:00
2016-02-22 02:52:08 +00:00
ADD start.sh /home/git/start.sh
2015-04-26 19:45:32 +00:00
2018-10-11 03:09:26 +00:00
COPY sshd_config /etc/ssh/sshd_config
2015-04-29 02:29:12 +00:00
2016-02-22 02:52:08 +00:00
CMD [ "/home/git/start.sh" ]
2015-04-26 19:45:32 +00:00