68 lines
1.7 KiB
Docker
68 lines
1.7 KiB
Docker
FROM python:3.6-stretch as base
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install -y --no-install-recommends \
|
|
build-essential git make gcc libtool libmhash-dev asciidoc
|
|
|
|
# Install deps
|
|
RUN pip install snakeoil
|
|
|
|
RUN pip install git+https://github.com/dol-sen/pyDeComp
|
|
|
|
# Clone catalyst repository
|
|
RUN git clone https://anongit.gentoo.org/git/proj/catalyst.git catalyst
|
|
|
|
# Build and install catalyst
|
|
WORKDIR /catalyst
|
|
RUN make && python -m setup install
|
|
|
|
# Get and uncompress shash
|
|
WORKDIR /
|
|
RUN wget ftp://mcrypt.hellug.gr/pub/mcrypt/shash/shash-0.2.6.tar.gz \
|
|
&& tar xvzf shash-0.2.6.tar.gz
|
|
|
|
# Build shash
|
|
WORKDIR shash-0.2.6
|
|
RUN cp /usr/share/libtool/build-aux/missing ./ \
|
|
&& ./configure --build=i686-pc-linux && make && make install
|
|
|
|
WORKDIR /
|
|
|
|
FROM python:3.6-alpine
|
|
|
|
RUN apk add coreutils
|
|
|
|
COPY --from=base /usr/local/lib/python3.6/site-packages/snakeoil* \
|
|
/usr/local/lib/python3.6/site-packages/
|
|
|
|
COPY --from=base /usr/local/lib/python3.6/site-packages/DeComp* \
|
|
/usr/local/lib/python3.6/site-packages/
|
|
|
|
COPY --from=base /usr/local/bin/shash /usr/local/bin/shash
|
|
|
|
COPY --from=base /usr/local/lib/python3.6/site-packages/catalyst* \
|
|
/usr/local/lib/python3.6/site-packages/
|
|
|
|
COPY --from=base /usr/share/catalyst /usr/share
|
|
|
|
COPY --from=base /etc/catalyst /etc/
|
|
|
|
# Override Stage3 preclean to add perl-cleaner invocation
|
|
COPY stage3-preclean-chroot.sh \
|
|
/usr/share/catalyst/targets/stage3/stage3-preclean-chroot.sh
|
|
|
|
# Volume for catalyst generated files
|
|
VOLUME /var/lib/catalyst
|
|
|
|
# Volume for downloaded distfiles
|
|
VOLUME /var/cache/portage/distfiles
|
|
|
|
# Volume for generated packages
|
|
VOLUME /var/cache/portage/packages
|
|
|
|
# The entrypoint…
|
|
COPY entrypoint.sh entrypoint.sh
|
|
|
|
# ... to be called
|
|
CMD /entrypoint.sh
|