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
|
# Minimal Dockerfile of a base image with Catmandu core on Debian stretch
FROM debian:stretch-slim
LABEL LibreCat community <librecat-dev@lists.uni-bielefeld.de>
ADD docker/apt.txt .
# Perl packages used by Catmandu (if available as Debian package) and cpanm
RUN apt-get update && apt-get install -y --no-install-recommends \
$(grep -vE "^\s*#" apt.txt | tr "\n" " ") cpanminus \
&& rm -rf /var/lib/apt/lists/*
ADD . /tmp/catmandu
WORKDIR /tmp/catmandu
# install from source
RUN cpanm -n -q --installdeps --skip-satisfied .
RUN perl Build.PL && ./Build && ./Build install
# cleanup sources
WORKDIR /
RUN rm -rf /tmp/catmandu
# make user feel home
RUN adduser --home /home/catmandu --uid 1000 --disabled-password --gecos "" catmandu
WORKDIR /home/catmandu
USER catmandu
# Default command
CMD ["bash"]
|