2022-12-05 19:39:58 +00:00
|
|
|
FROM --platform=$BUILDPLATFORM alpine:3.17.0 as prep
|
|
|
|
ARG BUILDPLATFORM
|
2022-12-05 00:36:52 +00:00
|
|
|
|
2022-12-05 01:21:57 +00:00
|
|
|
COPY docker /docker/
|
2022-12-04 21:46:35 +00:00
|
|
|
|
2022-12-05 21:18:33 +00:00
|
|
|
RUN chmod 755 /docker/root/usr/bin/entrypoint /docker/root/usr/local/bin/gitea /docker/root/etc/s6/gitea/* /docker/root/etc/s6/openssh/* /docker/root/etc/s6/.s6-svscan/*
|
2022-12-04 21:46:35 +00:00
|
|
|
|
2022-12-04 20:28:30 +00:00
|
|
|
FROM alpine:3.17.0
|
2022-12-04 14:50:37 +00:00
|
|
|
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"]
|
|
|
|
|
2022-12-05 00:36:52 +00:00
|
|
|
COPY --from=prep /docker/root /
|
2022-12-05 21:06:06 +00:00
|
|
|
COPY --chmod=755 ./docker/bin/$TARGETPLATFORM/* /app/gitea/
|
|
|
|
RUN ln -s /app/gitea/environment-to-ini /usr/local/bin/environment-to-ini
|