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 23:15:27 +01:00
|
|
|
build-essential libxml2-utils git make gcc libtool libmhash-dev \
|
|
|
|
asciidoc asciidoc-dblatex
|
2018-11-25 22:09:49 +01:00
|
|
|
|
|
|
|
# Install deps
|
2018-11-26 00:46:48 +01:00
|
|
|
RUN git clone https://github.com/pkgcore/snakeoil
|
|
|
|
WORKDIR snakeoil
|
2018-11-26 00:54:10 +01:00
|
|
|
RUN python -m setup bdist install
|
2018-11-26 00:46:48 +01:00
|
|
|
|
|
|
|
#RUN pip install snakeoil
|
|
|
|
#RUN pip wheel snakeoil
|
2018-11-25 22:09:49 +01:00
|
|
|
|
2018-11-26 00:24:07 +01:00
|
|
|
#RUN pip install git+https://github.com/dol-sen/pyDeComp
|
|
|
|
RUN git clone https://github.com/dol-sen/pyDeComp pydecomp
|
2018-11-25 22:09:49 +01:00
|
|
|
|
2018-11-26 00:24:07 +01:00
|
|
|
WORKDIR pydecomp
|
2018-11-26 00:54:10 +01:00
|
|
|
RUN python -m setup bdist install
|
2018-11-26 00:24:07 +01:00
|
|
|
|
|
|
|
WORKDIR /
|
2018-11-25 22:09:49 +01:00
|
|
|
# Clone catalyst repository
|
|
|
|
RUN git clone https://anongit.gentoo.org/git/proj/catalyst.git catalyst
|
|
|
|
|
|
|
|
# Build and install catalyst
|
|
|
|
WORKDIR /catalyst
|
2018-11-26 00:54:10 +01:00
|
|
|
RUN make && python -m setup bdist
|
2018-11-25 22:09:49 +01:00
|
|
|
|
|
|
|
# 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:57:18 +01:00
|
|
|
FROM python:3.6-alpine
|
2018-11-25 21:13:44 +01:00
|
|
|
|
2018-11-26 00:38:15 +01:00
|
|
|
#RUN apk add coreutils
|
2018-11-25 21:13:44 +01:00
|
|
|
|
2018-11-26 00:38:15 +01:00
|
|
|
COPY --from=base /snakeoil-*.whl ./
|
|
|
|
RUN pip install snakeoil-*.whl && rm snakeoil-*.whl
|
2018-11-25 21:13:44 +01:00
|
|
|
|
2018-11-26 00:24:07 +01:00
|
|
|
COPY --from=base /pydecomp/dist/pyDeComp-*.tar.gz ./
|
|
|
|
RUN tar -xzf pyDeComp-*.tar.gz && rm pyDeComp-*.tar.gz
|
2018-11-25 20:29:34 +01:00
|
|
|
|
2018-11-26 00:24:07 +01:00
|
|
|
COPY --from=base /catalyst/dist/catalyst-*.tar.gz ./
|
|
|
|
RUN tar -xzf catalyst-*.tar.gz && rm catalyst-*.tar.gz
|
2018-11-25 23:31:27 +01:00
|
|
|
|
2018-11-25 23:39:28 +01:00
|
|
|
COPY --from=base /usr/local/bin/shash /usr/local/bin/shash
|
|
|
|
|
2018-11-25 18:39:43 +01:00
|
|
|
# Override Stage3 preclean to add perl-cleaner invocation
|
|
|
|
COPY stage3-preclean-chroot.sh \
|
2018-11-25 23:23:14 +01:00
|
|
|
/usr/local/share/catalyst/targets/stage3/stage3-preclean-chroot.sh
|
2018-11-25 18:39:43 +01:00
|
|
|
|
|
|
|
# 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
|