-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.finalresult
38 lines (30 loc) · 1.86 KB
/
Dockerfile.finalresult
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# syntax=docker/dockerfile:experimental
ARG DbVersion=7000072
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS lfmerge-builder-base
# Ensure fieldworks group exists in case lfmerge-fdo package didn't install it, and that www-data is part of that group
# Also ensure that www-data has a .local dir in its home directory (/var/www) since some of lfmerge's dependencies assume that $HOME/.local exists
RUN addgroup --system --quiet fieldworks ; \
adduser --quiet www-data fieldworks ; \
install -d -o www-data -g www-data -m 02775 /var/www/.local/share
# install LFMerge prerequisites
# tini - PID 1 handler
# python - required by Mercurial, which is bundled in the LFMerge installation
# iputils-ping - Chorus (part of LFMerge) requires the "ping" command to be available on the command line
# less - so we can read syslog during manual debugging of issues
# vim-tiny - so we can edit state files (to change HOLD to IDLE) during manual debugging of issues
RUN apt-get update \
&& apt-get install --yes --no-install-recommends tini python-is-python3 sudo iputils-ping inotify-tools less vim-tiny \
&& rm -rf /var/lib/apt/lists/*
ADD tarball/lfmerge* /
RUN mkdir -m 02775 -p /var/lib/languageforge/lexicon/sendreceive/syncqueue /var/lib/languageforge/lexicon/sendreceive/webwork /var/lib/languageforge/lexicon/sendreceive/Templates /var/lib/languageforge/lexicon/sendreceive/state && chown -R www-data:www-data /var/lib/languageforge
RUN install -d -o www-data -g www-data -m 02775 /var/run/lfmerge
COPY sudoers.d.lfmerge.conf /etc/sudoers.d/lfmerge
COPY mercurial-cacerts.rc /etc/mercurial/hgrc
COPY lfmergeqm-background.sh /
COPY lfmergeqm-looping.sh /
COPY entrypoint.sh /
RUN chmod +x /lfmergeqm-background.sh /lfmergeqm-looping.sh /entrypoint.sh
# ENV DbVersion=${DbVersion}
# ENV DBVERSION=${DbVersion}
ENTRYPOINT [ "/usr/bin/tini", "-g", "--", "/entrypoint.sh" ]
CMD [ "/lfmergeqm-looping.sh" ]