53 lines
1.1 KiB
Docker
53 lines
1.1 KiB
Docker
FROM codeberg.org/forgejo/alpine:3.17.0
|
|
LABEL maintainer="contact@forgejo.org"
|
|
|
|
ARG TARGETPLATFORM
|
|
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
|
|
|
|
EXPOSE 22 3000
|
|
|
|
#regrouped as updates to it should happen less frequently
|
|
RUN addgroup \
|
|
-S -g 1000 \
|
|
git && \
|
|
adduser \
|
|
-S -H -D \
|
|
-h /data/git \
|
|
-s /bin/bash \
|
|
-u 1000 \
|
|
-G git \
|
|
git && \
|
|
echo "git:*" | chpasswd -e
|
|
|
|
RUN apk --no-cache add \
|
|
bash \
|
|
ca-certificates \
|
|
curl \
|
|
gettext \
|
|
git \
|
|
linux-pam \
|
|
openssh \
|
|
s6 \
|
|
sqlite \
|
|
su-exec \
|
|
gnupg \
|
|
tzdata
|
|
|
|
ENV USER git
|
|
ENV GITEA_CUSTOM /data/gitea
|
|
|
|
VOLUME ["/data"]
|
|
|
|
ENTRYPOINT ["/usr/bin/entrypoint"]
|
|
CMD ["/bin/s6-svscan", "/etc/s6"]
|
|
|
|
COPY docker/root /
|
|
COPY docker/bin/$TARGETPLATFORM/forgejo /app/gitea/gitea
|
|
COPY docker/bin/$TARGETPLATFORM/environment-to-ini /usr/local/bin/environment-to-ini
|
|
#
|
|
# s/755/775/ in the following is to avoid the corrupted layer 4f4fb700ef54
|
|
# https://codeberg.org/Codeberg/Community/issues/800#issue-210309
|
|
#
|
|
RUN chmod 775 /usr/bin/entrypoint /app/gitea/gitea /usr/local/bin/gitea /usr/local/bin/environment-to-ini
|
|
RUN chmod 775 /etc/s6/gitea/* /etc/s6/openssh/* /etc/s6/.s6-svscan/*
|