gentoo-builder/Dockerfile

94 lines
2.2 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
2018-11-26 01:03:46 +01:00
# Build and install snakeoil
2018-11-26 00:46:48 +01:00
RUN git clone https://github.com/pkgcore/snakeoil
2018-11-26 01:03:46 +01:00
2018-11-26 00:46:48 +01:00
WORKDIR snakeoil
2018-11-26 01:03:46 +01:00
RUN python -m setup bdist
2018-11-26 00:46:48 +01:00
2018-11-26 01:03:46 +01:00
WORKDIR /
2018-11-26 21:32:26 +01:00
RUN tar xvzf snakeoil/dist/snakeoil-*.tar.gz
2018-11-25 22:09:49 +01:00
2018-11-26 01:03:46 +01:00
# Build and install pyDeComp
2018-11-26 00:24:07 +01:00
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 01:03:46 +01:00
RUN python -m setup bdist
2018-11-26 00:24:07 +01:00
WORKDIR /
2018-11-26 21:32:26 +01:00
RUN tar xvzf pydecomp/dist/pyDeComp-*.tar.gz
2018-11-26 01:03:46 +01:00
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
WORKDIR /
2018-11-26 01:03:46 +01:00
# Get and uncompress shash
2018-11-25 22:09:49 +01:00
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-26 01:13:01 +01:00
FROM python:3.6-stretch
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
2019-01-15 21:30:52 +01:00
rsync libmhash2 lbzip2 pixz \
2018-11-26 01:13:01 +01:00
&& rm -rf /var/lib/apt/lists/*
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 01:13:01 +01:00
COPY --from=base /snakeoil/dist/snakeoil-*.tar.gz ./
2018-11-26 21:32:26 +01:00
RUN tar xvzf snakeoil-*.tar.gz \
2018-11-26 09:08:25 +01:00
&& rm snakeoil-*.tar.gz
2018-11-25 21:13:44 +01:00
2018-11-26 00:24:07 +01:00
COPY --from=base /pydecomp/dist/pyDeComp-*.tar.gz ./
2018-11-26 21:32:26 +01:00
RUN tar xvzf pyDeComp-*.tar.gz \
2018-11-26 09:08:25 +01:00
&& 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 ./
2018-11-26 21:32:26 +01:00
RUN tar xvzf catalyst-*.tar.gz \
2018-11-26 21:24:14 +01:00
&& rm catalyst-*.tar.gz
2018-11-25 23:31:27 +01:00
2018-11-26 21:32:26 +01:00
RUN ln -sf /usr/local/share/catalyst /usr/share/catalyst
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
2019-01-17 01:59:36 +01:00
#COPY stage3-preclean-chroot.sh \
# /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
2019-01-17 01:59:36 +01:00
# Copy base specs.
COPY stage1.spec stage1.spec
COPY stage2.spec stage2.spec
COPY stage3.spec stage3.spec
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