grim/hgkeeper

closing merged branch
feature/hgweb
2019-12-18, Gary Kramlich
ded204f16be1
closing merged branch
FROM golang:1.13-buster as build
WORKDIR /root
COPY . .
RUN go get -u github.com/mjibson/esc && \
go generate ./... && \
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static" -s' .
FROM debian:buster-slim
RUN set -ex && \
apt-get update && \
apt-get install -y --no-install-recommends \
python libpython-dev python-pip python-setuptools build-essential \
openssh-client nvi procps \
&& \
pip install --no-binary :all: mercurial hg-evolve && \
apt-get remove -y --purge \
libpython2.7-dev python-pip python-setuptools build-essential \
&& \
apt-get autoremove --purge -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists
RUN set -ex && \
groupadd -g 22271 hg && \
useradd -m -d /var/lib/hg -u 22271 -g hg hg
RUN set -ex && \
mkdir -p /etc/mercurial && \
printf "[extensions]\nhgext3rd.evolve=\n" > /etc/mercurial/hgrc
COPY --from=build /root/hgkeeper /usr/local/bin/hgkeeper
USER hg
CMD ["hgkeeper", "serve"]