Try to build using Gentoo base.
This commit is contained in:
parent
d16572b01a
commit
c699caf415
81
Dockerfile
81
Dockerfile
@ -1,76 +1,19 @@
|
||||
FROM python:3.6-stretch as base
|
||||
FROM gentoo/stage3-amd64-hardened as base
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
build-essential libxml2-utils git make gcc libtool libmhash-dev \
|
||||
asciidoc asciidoc-dblatex
|
||||
RUN mkdir /usr/portage && emerge-webrsync
|
||||
|
||||
# Build and install snakeoil
|
||||
RUN git clone https://github.com/pkgcore/snakeoil
|
||||
RUN emerge dev-util/catalyst
|
||||
RUN quickpkg dev-util/catalyst
|
||||
|
||||
WORKDIR snakeoil
|
||||
RUN python -m setup bdist
|
||||
FROM gentoo/stage3-amd64-hardened
|
||||
|
||||
WORKDIR /
|
||||
RUN tar xvzf snakeoil/dist/snakeoil-*.tar.gz
|
||||
|
||||
# Build and install pyDeComp
|
||||
RUN git clone https://github.com/dol-sen/pyDeComp pydecomp
|
||||
|
||||
WORKDIR pydecomp
|
||||
RUN python -m setup bdist
|
||||
|
||||
WORKDIR /
|
||||
RUN tar xvzf pydecomp/dist/pyDeComp-*.tar.gz
|
||||
|
||||
# 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 bdist
|
||||
|
||||
WORKDIR /
|
||||
|
||||
# Get and uncompress shash
|
||||
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-stretch
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
rsync libmhash2 lbzip2 pixz \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#RUN apk add coreutils
|
||||
|
||||
COPY --from=base /snakeoil/dist/snakeoil-*.tar.gz ./
|
||||
RUN tar xvzf snakeoil-*.tar.gz \
|
||||
&& rm snakeoil-*.tar.gz
|
||||
|
||||
COPY --from=base /pydecomp/dist/pyDeComp-*.tar.gz ./
|
||||
RUN tar xvzf pyDeComp-*.tar.gz \
|
||||
&& rm pyDeComp-*.tar.gz
|
||||
|
||||
COPY --from=base /catalyst/dist/catalyst-*.tar.gz ./
|
||||
RUN tar xvzf catalyst-*.tar.gz \
|
||||
&& rm catalyst-*.tar.gz
|
||||
|
||||
RUN ln -sf /usr/local/share/catalyst /usr/share/catalyst
|
||||
|
||||
COPY --from=base /usr/local/bin/shash /usr/local/bin/shash
|
||||
|
||||
# Override Stage3 preclean to add perl-cleaner invocation
|
||||
#COPY stage3-preclean-chroot.sh \
|
||||
# /usr/local/share/catalyst/targets/stage3/stage3-preclean-chroot.sh
|
||||
# Copy needed files
|
||||
COPY --from=base /etc /etc
|
||||
COPY --from=base /usr/bin /usr/bin
|
||||
COPY --from=base /usr/include /usr/include
|
||||
COPY --from=base /usr/lib /usr/lib
|
||||
COPY --from=base /usr/lib64 /usr/lib64
|
||||
COPY --from=base /usr/share /usr/share
|
||||
|
||||
# Volume for catalyst generated files
|
||||
VOLUME /var/lib/catalyst
|
||||
|
Loading…
Reference in New Issue
Block a user