gentoo-builder/Dockerfile

43 lines
1019 B
Docker
Raw Normal View History

2018-11-25 18:39:43 +01:00
FROM python:3.7-alpine
2018-11-25 19:00:21 +01:00
RUN apk add --no-cache --virtual .build-deps \
2018-11-25 20:03:02 +01:00
git make gcc musl-dev asciidoc \
2018-11-25 20:04:42 +01:00
\
2018-11-25 19:58:37 +01:00
# Install deps
2018-11-25 19:00:21 +01:00
&& pip install snakeoil \
2018-11-25 20:15:29 +01:00
&& pip install git+https://github.com/dol-sen/pyDeComp \
2018-11-25 20:04:42 +01:00
\
2018-11-25 19:58:37 +01:00
# Clone catalyst repository
&& git clone https://anongit.gentoo.org/git/proj/catalyst.git catalyst \
2018-11-25 20:04:42 +01:00
\
2018-11-25 19:58:37 +01:00
# Build and install catalyst
&& cd catalyst \
&& make \
&& python -m setup install \
2018-11-25 20:04:42 +01:00
\
2018-11-25 19:58:37 +01:00
# Cleanup
2018-11-25 20:03:18 +01:00
&& cd .. \
&& rm -Rf catalyst \
2018-11-25 19:58:37 +01:00
&& apk del .build-deps
2018-11-25 18:39:43 +01:00
2018-11-25 20:29:34 +01:00
RUN apk add coreutils rhash
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