Skip to content

Instantly share code, notes, and snippets.

@BrianZbr
Last active November 3, 2022 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianZbr/9105952e93ae84dbcb791548c20d07b6 to your computer and use it in GitHub Desktop.
Save BrianZbr/9105952e93ae84dbcb791548c20d07b6 to your computer and use it in GitHub Desktop.
Arch-based Dockerfile for running dpsprep
# Dockerfile for running https://github.com/kcroker/dpsprep
# Steps to deploy:
# 1) in an empty folder with this Dokcerfile run:
# docker build . -t dps-arch
# 2) in a folder with the djvu file(s) you want to convert to PDF:
# sudo docker run --name dps-arch -d -it -v "$(pwd)":/files dps-arch
# 3) convert a file "infile.djvu" to "outfile.pdf":
# docker exec -it dps-arch dpsprep infile.djvu outfile.pdf
FROM archlinux:base-devel
RUN pacman -Syy
RUN pacman -S --noconfirm git python djvulibre pdftk\
java-commons-lang python-argparse ruby-iconv\
openjpeg2 imagemagick python-pip
RUN useradd builduser -m &&\
passwd -d builduser &&\
printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/python2.git &&\
cd python2 && makepkg -s --noconfirm --nocheck --skippgp --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/python2-setuptools.git &&\
cd python2-setuptools && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/cython2.git &&\
cd cython2 && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/python2-subprocess32.git &&\
cd python2-subprocess32 && makepkg -s --noconfirm --nocheck --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/python2-djvulibre.git &&\
cd python2-djvulibre && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/python2-lxml.git &&\
cd python2-lxml && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/ocrodjvu.git &&\
cd ocrodjvu && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/ruby-ascii85.git &&\
cd ruby-ascii85 && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/ruby-ruby-rc4.git &&\
cd ruby-ruby-rc4 && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/ruby-hashery.git &&\
cd ruby-hashery && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/ruby-ttfunk.git &&\
cd ruby-ttfunk && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/ruby-afm.git &&\
cd ruby-afm && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/ruby-pdf-reader.git &&\
cd ruby-pdf-reader && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/ruby-rmagick &&\
cd ruby-rmagick && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/ruby-nokogiri.git &&\
cd ruby-nokogiri && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/pdfbeads.git &&\
cd pdfbeads && makepkg -s --noconfirm --install'
RUN pacman -S --noconfirm ruby-mini_portile2
RUN pip install setuptools
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/python-sexpdata.git &&\
cd python-sexpdata && makepkg -s --noconfirm --install'
RUN sudo -u builduser\
bash -c 'cd ~ && git clone https://aur.archlinux.org/dpsprep-git.git &&\
cd dpsprep-git && makepkg -s --noconfirm --install'
RUN mkdir /files
WORKDIR /files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment