mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-27 04:24:08 +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.
41 lines
618 B
Docker
41 lines
618 B
Docker
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"]
|
|
|