2018-11-25 22:09:49 +01:00
|
|
|
FROM python:3.6-stretch as base
|
|
|
|
|
2018-11-25 22:12:52 +01:00
|
|
|
RUN apt-get update
|
2018-11-25 22:56:58 +01:00
|
|
|
RUN apt-get install -y --no-install-recommends \
|
2018-11-25 22:34:10 +01:00
|
|
|
build-essential git make gcc libtool libmhash-dev asciidoc
|
2018-11-25 22:09:49 +01:00
|
|
|
|
|
|
|
# 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 ./ \
|
2018-11-25 22:48:38 +01:00
|
|
|
&& ./configure --build=i686-pc-linux && make && make install
|
2018-11-25 22:09:49 +01:00
|
|
|
|
|
|
|
WORKDIR /
|
2018-11-25 18:39:43 +01:00
|
|
|
|
2018-11-25 22:35:54 +01:00
|
|
|
FROM python:3.6-alpine as base
|
2018-11-25 21:13:44 +01:00
|
|
|
|
|
|
|
RUN apk add coreutils
|
|
|
|
|
2018-11-25 21:21:44 +01:00
|
|
|
COPY --from=base /usr/local/lib/python3.6/site-packages/snakeoil* \
|
2018-11-25 21:13:44 +01:00
|
|
|
/usr/local/lib/python3.6/site-packages/
|
|
|
|
|
2018-11-25 21:21:44 +01:00
|
|
|
COPY --from=base /usr/local/lib/python3.6/site-packages/DeComp* \
|
2018-11-25 21:16:32 +01:00
|
|
|
/usr/local/lib/python3.6/site-packages/
|
2018-11-25 21:13:44 +01:00
|
|
|
|
|
|
|
COPY --from=base /usr/local/bin/shash /usr/local/bin/shash
|
|
|
|
|
2018-11-25 21:21:44 +01:00
|
|
|
COPY --from=base /usr/local/lib/python3.6/site-packages/catalyst* \
|
2018-11-25 21:13:44 +01:00
|
|
|
/usr/local/lib/python3.6/site-packages/
|
|
|
|
|
|
|
|
COPY --from=base /usr/share/catalyst /usr/share
|
|
|
|
|
|
|
|
COPY --from=base /etc/catalyst /etc/
|
2018-11-25 20:29:34 +01:00
|
|
|
|
2018-11-25 18:39:43 +01:00
|
|
|
# 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
|
2018-11-04 03:49:15 +01:00
|
|
|
VOLUME /var/lib/catalyst
|
2018-11-25 18:39:43 +01:00
|
|
|
|
|
|
|
# Volume for downloaded distfiles
|
2018-11-04 03:49:15 +01:00
|
|
|
VOLUME /var/cache/portage/distfiles
|
2018-11-25 18:39:43 +01:00
|
|
|
|
|
|
|
# Volume for generated packages
|
2018-11-04 03:49:15 +01:00
|
|
|
VOLUME /var/cache/portage/packages
|
|
|
|
|
2018-11-25 18:39:43 +01:00
|
|
|
# The entrypoint…
|
2018-11-04 03:49:15 +01:00
|
|
|
COPY entrypoint.sh entrypoint.sh
|
2018-11-25 18:39:43 +01:00
|
|
|
|
|
|
|
# ... to be called
|
2018-11-04 03:49:15 +01:00
|
|
|
CMD /entrypoint.sh
|