-
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.
Reviewed to keep the size as low as possible.
- Loading branch information
Showing
2 changed files
with
77 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,66 @@ | ||
# DigiPres Toolbox | ||
# A Docker image with some tools pre-installed | ||
FROM python:3.10-bullseye | ||
# ---------------- | ||
# | ||
# A Docker image with some DigiPres tools pre-installed | ||
# | ||
|
||
# Core Jupyter support: | ||
RUN pip install --no-cache notebook jupyterlab bash_kernel | ||
RUN python -m bash_kernel.install | ||
# Start from as small an image as possible: | ||
FROM python:3.11-slim-bullseye | ||
|
||
# Some lightweight tools and support for installing more: | ||
RUN apt-get update && apt-get install -y sudo mediainfo cloc && \ | ||
# Some (smallish) tools and support for installing more (69MB) | ||
RUN apt-get update && apt-get install -y curl mediainfo cloc unzip file && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Siegfried: | ||
# Install JRE for Java programs (headless 250MB, headful is 431MB) | ||
RUN apt-get update && apt-get install -y default-jre-headless && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Siegfried (71MB) | ||
ENV SF_VERSION=1.11.1 | ||
ENV SF_DEB=siegfried_${SF_VERSION}-1_amd64.deb | ||
RUN curl -s -L -O https://github.com/richardlehane/siegfried/releases/download/v${SF_VERSION}/${SF_DEB} && \ | ||
dpkg -i ${SF_DEB} && \ | ||
rm -f ${SF_DEB} && \ | ||
sf -update | ||
|
||
# Install TRiD: | ||
# Install TRiD (9MB) | ||
RUN curl -s -L -O http://mark0.net/download/trid_linux_64.zip && \ | ||
curl -s -L -O http://mark0.net/download/triddefs.zip && \ | ||
unzip trid_linux_64.zip && unzip triddefs.zip && chmod +x ./trid && \ | ||
mv ./trid /usr/local/bin/trid && mv triddefs.trd /usr/local/bin/ && \ | ||
rm -f trid_linux_64.zip triddefs.zip | ||
curl -s -L -O http://mark0.net/download/triddefs.zip && \ | ||
unzip trid_linux_64.zip && unzip triddefs.zip && chmod +x ./trid && \ | ||
mv ./trid /usr/local/bin/trid && mv triddefs.trd /usr/local/bin/ && \ | ||
rm -f trid_linux_64.zip triddefs.zip | ||
|
||
# Install Fido: | ||
RUN pip install --no-cache opf-fido | ||
# Install Fido (10MB) | ||
RUN pip install --no-cache-dir opf-fido | ||
|
||
# Install JRE for Java programs and ffmpeg for a/v formats (c. 0.6GB!): | ||
RUN apt-get update && apt-get install -y default-jre ffmpeg && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
# Install RClone (62MB) as per https://rclone.org/install/#linux-precompiled | ||
RUN curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip && \ | ||
unzip rclone-current-linux-amd64.zip && \ | ||
cp rclone-*-linux-amd64/rclone /usr/bin/ && \ | ||
chown root:root /usr/bin/rclone && \ | ||
chmod 755 /usr/bin/rclone && \ | ||
rm -fr rclone-*-linux-* | ||
|
||
# Install GitHub Linguist and it's build dependencies (c. 0.2GB): | ||
RUN apt-get update && \ | ||
apt-get install -y cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
RUN gem install github-linguist | ||
# | ||
# Skipping the following to try to keep the image size down... | ||
# | ||
|
||
# Install Apache Tika (needs Java): | ||
ENV TIKA_VERSION=2.9.2 | ||
RUN curl -s -L -o /usr/share/java/tika-app-${TIKA_VERSION}.jar https://dlcdn.apache.org/tika/${TIKA_VERSION}/tika-app-${TIKA_VERSION}.jar && \ | ||
ln -s /usr/share/java/tika-app-${TIKA_VERSION}.jar /usr/share/java/tika-app.jar | ||
COPY tika.sh /usr/local/bin/tika.sh | ||
# Install GitHub Linguist (~200MB at least, depending on shared deps) | ||
#RUN apt-get update && \ | ||
# apt-get install -y build-essential cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev && \ | ||
# gem install github-linguist && \ | ||
# apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install DROID (needs Java) | ||
COPY droid /usr/share/java/droid | ||
RUN ln -s /usr/share/java/droid/droid.sh /usr/local/bin/droid.sh | ||
# Install ffmpeg for a/v formats (484MB!) | ||
# RUN apt-get update && apt-get install -y ffmpeg && \ | ||
# apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Apache Tika (needs Java) | ||
#ENV TIKA_VERSION=2.9.2 | ||
#RUN curl -s -L -o /usr/share/java/tika-app-${TIKA_VERSION}.jar https://dlcdn.apache.org/tika/${TIKA_VERSION}/tika-app-${TIKA_VERSION}.jar && \ | ||
# ln -s /usr/share/java/tika-app-${TIKA_VERSION}.jar /usr/share/java/tika-app.jar | ||
#COPY tika.sh /usr/local/bin/tika.sh | ||
|
||
# Install DROID (needs Java) | ||
#COPY droid /usr/share/java/droid | ||
#RUN ln -s /usr/share/java/droid/droid.sh /usr/local/bin/droid.sh |
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