gentoo-builder/Dockerfile

71 lines
1.8 KiB
Docker
Raw Normal View History

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
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:57:18 +01:00
FROM python:3.6-alpine
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/
2018-11-25 23:23:14 +01:00
COPY --from=base /usr/local/share/catalyst /usr/local/share
2018-11-25 21:13:44 +01:00
COPY --from=base /etc/catalyst /etc/
2018-11-25 20:29:34 +01:00
2018-11-25 23:31:27 +01:00
COPY --from=base /usr/local/bin/catalyst /usr/local/bin/catalyst
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