forked from artefactual-labs/ccp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
960 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
# This is a copy of the Archivematica Dockerfile targeting MCPClient only | ||
# I couldn't use the original because testcontainers-go refuses to build it, | ||
# apparently because it's not using BuildKit. | ||
|
||
ARG UBUNTU_VERSION=22.04 | ||
ARG USER_ID=1000 | ||
ARG GROUP_ID=1000 | ||
ARG PYTHON_VERSION=3.9 | ||
ARG PYENV_DIR=/pyenv | ||
|
||
# ----------------------------------------------------------------------------- | ||
|
||
FROM ubuntu:${UBUNTU_VERSION} AS base-builder | ||
|
||
ARG PYENV_DIR | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
RUN set -ex \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
gnupg \ | ||
libldap2-dev \ | ||
libmysqlclient-dev \ | ||
libsasl2-dev \ | ||
libsqlite3-dev \ | ||
locales \ | ||
pkg-config \ | ||
tzdata \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
RUN locale-gen en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
ENV PYENV_ROOT=${PYENV_DIR}/data | ||
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH | ||
|
||
# ----------------------------------------------------------------------------- | ||
|
||
FROM base-builder AS pyenv-builder | ||
|
||
ARG PYTHON_VERSION | ||
|
||
RUN set -ex \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
libbz2-dev \ | ||
libffi-dev \ | ||
liblzma-dev \ | ||
libncursesw5-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
libssl-dev \ | ||
libxml2-dev \ | ||
libxmlsec1-dev \ | ||
tk-dev \ | ||
xz-utils \ | ||
zlib1g-dev \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
RUN set -ex \ | ||
&& curl --retry 3 -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash \ | ||
&& pyenv install ${PYTHON_VERSION} \ | ||
&& pyenv global ${PYTHON_VERSION} | ||
|
||
COPY --link requirements-dev.txt /src/requirements-dev.txt | ||
|
||
RUN set -ex \ | ||
&& pyenv exec python3 -m pip install --upgrade pip setuptools \ | ||
&& pyenv exec python3 -m pip install --requirement /src/requirements-dev.txt \ | ||
&& pyenv rehash | ||
|
||
|
||
# ----------------------------------------------------------------------------- | ||
|
||
FROM base-builder as base | ||
|
||
ARG USER_ID | ||
ARG GROUP_ID | ||
ARG PYENV_DIR | ||
|
||
RUN set -ex \ | ||
&& curl --retry 3 -fsSL https://packages.archivematica.org/1.16.x/key.asc | gpg --dearmor -o /etc/apt/keyrings/archivematica-1.16.x.gpg \ | ||
&& echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/archivematica-1.16.x.gpg] http://packages.archivematica.org/1.16.x/ubuntu-externals jammy main" > /etc/apt/sources.list.d/archivematica-external.list \ | ||
&& curl --retry 3 -so /tmp/repo-mediaarea_1.0-21_all.deb -L https://mediaarea.net/repo/deb/repo-mediaarea_1.0-21_all.deb \ | ||
&& dpkg -i /tmp/repo-mediaarea_1.0-21_all.deb \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
atool \ | ||
bulk-extractor \ | ||
clamav \ | ||
coreutils \ | ||
ffmpeg \ | ||
fits \ | ||
g++ \ | ||
gcc \ | ||
gearman \ | ||
gettext \ | ||
ghostscript \ | ||
hashdeep \ | ||
imagemagick \ | ||
inkscape \ | ||
jhove \ | ||
libffi-dev \ | ||
libimage-exiftool-perl \ | ||
libldap2-dev \ | ||
libmysqlclient-dev \ | ||
libsasl2-dev \ | ||
libssl-dev \ | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
logapp \ | ||
md5deep \ | ||
mediaconch \ | ||
mediainfo \ | ||
nailgun \ | ||
nfs-common \ | ||
openjdk-8-jre-headless \ | ||
p7zip-full \ | ||
pbzip2 \ | ||
pst-utils \ | ||
python3-lxml \ | ||
rsync \ | ||
siegfried \ | ||
sleuthkit \ | ||
tesseract-ocr \ | ||
tree \ | ||
unar \ | ||
unrar-free \ | ||
uuid \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
RUN set -ex \ | ||
&& groupadd --gid ${GROUP_ID} --system archivematica \ | ||
&& useradd --uid ${USER_ID} --gid ${GROUP_ID} --home-dir /var/archivematica --system archivematica \ | ||
&& mkdir -p /var/archivematica/sharedDirectory \ | ||
&& chown -R archivematica:archivematica /var/archivematica | ||
|
||
# Download ClamAV virus signatures | ||
RUN freshclam --quiet | ||
|
||
USER archivematica | ||
|
||
COPY --chown=${USER_ID}:${GROUP_ID} --from=pyenv-builder --link ${PYENV_DIR} ${PYENV_DIR} | ||
COPY --chown=${USER_ID}:${GROUP_ID} --link . /src | ||
|
||
# ----------------------------------------------------------------------------- | ||
|
||
FROM base | ||
|
||
ENV DJANGO_SETTINGS_MODULE settings.common | ||
ENV PYTHONPATH /src/src/MCPClient/lib/:/src/src/MCPClient/lib/clientScripts:/src/src/archivematicaCommon/lib/:/src/src/dashboard/src/ | ||
ENV ARCHIVEMATICA_MCPCLIENT_ARCHIVEMATICACLIENTMODULES /src/src/MCPClient/lib/archivematicaClientModules | ||
ENV ARCHIVEMATICA_MCPCLIENT_CLIENTASSETSDIRECTORY /src/src/MCPClient/lib/assets/ | ||
ENV ARCHIVEMATICA_MCPCLIENT_CLIENTSCRIPTSDIRECTORY /src/src/MCPClient/lib/clientScripts/ | ||
|
||
# Some scripts in archivematica-fpr-admin executed by MCPClient rely on certain | ||
# files being available in this image (e.g. see https://git.io/vA1wF). | ||
COPY --link src/archivematicaCommon/lib/externals/fido/ /usr/lib/archivematica/archivematicaCommon/externals/fido/ | ||
COPY --link src/archivematicaCommon/lib/externals/fiwalk_plugins/ /usr/lib/archivematica/archivematicaCommon/externals/fiwalk_plugins/ | ||
|
||
ENTRYPOINT ["pyenv", "exec", "python3", "/src/src/MCPClient/lib/archivematicaClient.py"] |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.