FROM golang:1.15-alpine3.12 ARG GOPROXY ARG UID ARG GID ENV GOPROXY ${GOPROXY:-direct} ARG GITEA_VERSION ARG TAGS="sqlite sqlite_unlock_notify" ENV TAGS "bindata timetzdata $TAGS netgo osusergo" ENV LDFLAGS '-linkmode external -extldflags "-static"' #Build deps RUN apk --no-cache add build-base git nodejs npm WORKDIR /src EXPOSE 22 3000 RUN echo DEBUG: "gg ${GID} uu ${UID}" RUN apk --no-cache add \ bash \ ca-certificates \ curl \ gettext \ git \ linux-pam \ openssh \ s6 \ sqlite \ su-exec \ gnupg RUN addgroup \ -S -g ${GID} \ git && \ adduser \ -S -H -D \ -h /home/git \ -s /bin/bash \ -u ${UID} \ -G git \ git && \ echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd ENV USER git VOLUME ["/home"]