mirror of
https://github.com/go-gitea/gitea
synced 2024-11-18 07:52:03 +01:00
1562e9ab70
1. Use `apk -U --no-cache add` instead of `apk update` + `apk add` + manually cache clean up. 2. Separate package installation and user, group setup, the combination to reduce a docker image layer didn't bring benefits here, only makes Dockerfiles more complex.
40 lines
618 B
Text
40 lines
618 B
Text
FROM aarch64/alpine:3.5
|
|
|
|
EXPOSE 22 3000
|
|
|
|
RUN apk -U --no-cache add \
|
|
su-exec \
|
|
ca-certificates \
|
|
sqlite \
|
|
bash \
|
|
git \
|
|
linux-pam \
|
|
s6 \
|
|
curl \
|
|
openssh \
|
|
tzdata
|
|
RUN addgroup \
|
|
-S -g 1000 \
|
|
git && \
|
|
adduser \
|
|
-S -H -D \
|
|
-h /data/git \
|
|
-s /bin/bash \
|
|
-u 1000 \
|
|
-G git \
|
|
git && \
|
|
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
|
|
|
|
ENV USER git
|
|
ENV GITEA_CUSTOM /data/gitea
|
|
|
|
COPY docker /
|
|
COPY gitea /app/gitea/gitea
|
|
|
|
ENV GODEBUG=netdns=go
|
|
|
|
VOLUME ["/data"]
|
|
|
|
ENTRYPOINT ["/usr/bin/entrypoint"]
|
|
CMD ["/bin/s6-svscan", "/etc/s6"]
|
|
|