-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (54 loc) · 2.55 KB
/
Dockerfile
File metadata and controls
64 lines (54 loc) · 2.55 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM ubuntu:focal
LABEL maintainer="Rolf Kleef <rolf@drostan.org>" \
description="Spreadsheets2IATI Engine for AIDA" \
repository="https://github.com/data4development/iati-workbenchtree/aida"
# IATI workbench: produce and use IATI data
# Copyright (C) 2016-2022, drostan.org and data4development.org
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# create a non-root user iati-workbench that will contain the code in its home folder
ARG \
UNAME=iati-workbench \
GID=1000 \
UID=1000 \
DEBIAN_FRONTEND=noninteractive
RUN groupadd -g $GID -o $UNAME && \
useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
RUN apt-get update && \
# installing: Ant, Saxon, BaseX the for main functionality; \
# LibreOffice to convert Excel en ODF files; \
# XmlStarlet to generate directory listings in XML; \
# libxml2-utils to have xmllint available; \
# Locales to generate an English-language European formats environment; \
# And to remove basex warnings: libjline2-java libjing-java libtagsoup-java libxml-commons-resolver1.1-java \
apt-get -y install --no-install-recommends ant xmlstarlet libxml2-utils libreoffice-calc-nogui libreoffice-java-common \
libsaxonhe-java basex libjline2-java libjing-java libtagsoup-java libxml-commons-resolver1.1-java locales && \
# enable and generate the locale we want: \
sed -i '/en_IE.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen && \
ln -s /usr/share/java/Saxon-HE.jar /usr/share/ant/lib && \
# reduce footprint of this layer: \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/lib/dpkg/info/* && \
rm -rf /usr/lib/libreoffice/share/gallery/* && \
rm -rf /usr/lib/libreoffice/share/template/* && \
rm -rf /usr/lib/libreoffice/share/wizards/* && \
rm -rf /usr/share/libreoffice/share/config/* && \
rm -rf /usr/share/doc/*
ENV HOME=/home/$UNAME
ENV LC_ALL=en_IE.UTF-8
ENV container=docker
WORKDIR $HOME
USER $UNAME
COPY --chown=$UID:$GID . $HOME
ENTRYPOINT ["/usr/bin/ant"]
CMD ["-p"]