gentoo-builder/Dockerfile

52 lines
1.2 KiB
Docker
Raw Normal View History

2018-11-25 18:39:43 +01:00
FROM python:3.7-alpine as base
2018-11-04 03:49:15 +01:00
2018-11-25 18:39:43 +01:00
ARG CATALYST_VERSION
2018-11-04 03:49:15 +01:00
2018-11-25 18:39:43 +01:00
RUN git clone https://anongit.gentoo.org/git/proj/catalyst.git catalyst
2018-11-04 03:49:15 +01:00
2018-11-25 18:39:43 +01:00
RUN pip install snakeoil
2018-11-04 03:49:15 +01:00
2018-11-25 18:39:43 +01:00
WORKDIR catalyst
2018-11-04 03:49:15 +01:00
2018-11-25 18:39:43 +01:00
RUN python -m setup install
2018-11-04 03:49:15 +01:00
2018-11-25 18:39:43 +01:00
FROM python:3.7-alpine
# Copy snakeoil files
COPY --from=base /usr/lib/python3.7/site-packages/snakeoil \
/usr/lib/python3.7/site-packages/
# Copy Catalyst library files
COPY --from=base /usr/lib/python3.7/site-packages/catalyst \
/usr/lib/python3.7/site-packages/
# Copy Catalyst shared files
COPY --from=base /usr/share/catalyst /usr/share/
# Copy Catalyst configuration files
COPY --from=base /etc/catalyst /etc/
# Copy Catalyst binary
COPY --from=base /usr/bin/catalyst /usr/bin/
# 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