grim/hgkeeper
Clone
Summary
Browse
Changes
Graph
Update all of our dependencies
2021-12-05, Gary Kramlich
ab67dc694c4b
Update all of our dependencies
FROM
golang:1.15-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:bullseye-slim
ENV
HGKEEPER_THEME_URL
=
https://keep.imfreedom.org/grim/hgkeeper-theme/archive/default.tar.gz
RUN
set
-ex
&&
\
apt-get
update
&&
\
apt-get
install
-y
--no-install-recommends
\
python3
libpython3-dev
python3-pip
python3-setuptools
build-essential
\
openssh-client
libffi7
libffi-dev
nvi
procps
wget
\
&&
\
pip3
install
--no-binary
:all:
mercurial
==
5
.7.1
hg-evolve
hgwebplus
&&
\
apt-get
remove
-y
--purge
\
libpython3-dev
python3-pip
python3-setuptools
build-essential
\
libffi-dev
\
&&
\
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
# install the hgkeeper theme
RUN
set
-ex
&&
\
cd
/tmp
&&
\
wget
-O
-
"
${
HGKEEPER_THEME_URL
}
"
|
tar
zx
&&
\
HGINST
=
$(
python3
-c
'import mercurial; print(mercurial.__path__[0])'
)
&&
\
cp
-a
/tmp/hgkeeper-theme-default/templates/hgkeeper/
$HGINST
/templates/
&&
\
cp
-a
/tmp/hgkeeper-theme-default/templates/static/hgk/
$HGINST
/templates/static/
&&
\
rm
-rf
/tmp/hgkeeper-theme-default
# setup the global mercurial configuration
COPY
hgrc
/etc/mercurial/hgrc
COPY
--from
=
build
/root/hgkeeper
/usr/local/bin/hgkeeper
CMD
[
"hgkeeper"
,
"serve"
]