Skip to content
Snippets Groups Projects
Commit 1c5823ef authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- add docker-script to compile checkit_tiff for Centos/Redhat 6.xx

parent 0f78b65a
No related branches found
No related tags found
No related merge requests found
FROM centos:6.8
MAINTAINER Andreas Romeyke <romeyke@slub-dresden.de>
# based on https://hub.docker.com/r/rpmbuild/centos6/
## install base environment
RUN yum install -y \
libtool libtool-ltdl \
make cmake \
git \
pkgconfig \
sudo \
automake autoconf \
wget \
yum-utils rpm-build && \
yum clean all
RUN wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
RUN yum install -y devtoolset-2-gcc devtoolset-2-binutils
RUN yum install -y devtoolset-2-gcc-c++ devtoolset-2-libstdc++-devel devtoolset-2-toolchain
#RUN yum install -y devtoolset-2
RUN scl enable devtoolset-2 bash
## add user environment
RUN useradd builder -u 1000 -m -G users,wheel && \
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "# macros" > /home/builder/.rpmmacros && \
echo "%_topdir /home/builder/rpm" >> /home/builder/.rpmmacros && \
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
mkdir /home/builder/rpm && \
chown -R builder /home/builder
USER builder
RUN scl enable devtoolset-2 bash
ENV FLAVOR=rpmbuild OS=centos DIST=el6 CC=/opt/rh/devtoolset-2/root/usr/bin/gcc CXX=/opt/rh/devtoolset-2/root/usr/bin/g++
CMD /srv/pkg
WORKDIR /home/builder/
# get and compile libpcre (v8)
RUN wget -np https://ftp.pcre.org/pub/pcre/pcre-8.41.tar.bz2
RUN tar xfj pcre-8.41.tar.bz2
WORKDIR /home/builder/pcre-8.41/
RUN ./configure --disable-shared -enable-static && /usr/bin/make -j
USER root
RUN /usr/bin/make install
USER builder
WORKDIR /home/builder/
# get and compile checkit_tiff
RUN git clone https://github.com/SLUB-digitalpreservation/checkit_tiff.git
WORKDIR /home/builder/checkit_tiff
RUN mkdir build_stable
WORKDIR /home/builder/checkit_tiff/build_stable
RUN cmake -DCMAKE_INSTALL_PREFIX=/tmp/checkit_tiff_stable/ \
-DPCRE_LIBRARY=../../pcre-8.41/.libs/libpcre.a \
-DPCRE_INCLUDE_DIR=../../pcre-8.41/ ../src
RUN make && make install
How to build checkit-tiff variants for Redhat system used by Rosetta
====================================================================
:lang: en
:encoding: utf-8
:author: Andreas Romeyke
== Prerequisites
* you need 'docker'
== How to build
docker build -t checkit-tiff --rm=true ./
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment