52 lines
1.2 KiB
Docker
52 lines
1.2 KiB
Docker
FROM python:3.7-alpine as base
|
|
|
|
ARG CATALYST_VERSION
|
|
|
|
RUN git clone https://anongit.gentoo.org/git/proj/catalyst.git catalyst
|
|
|
|
RUN pip install snakeoil
|
|
|
|
WORKDIR catalyst
|
|
|
|
RUN python -m setup install
|
|
|
|
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
|
|
VOLUME /var/lib/catalyst
|
|
|
|
# Volume for downloaded distfiles
|
|
VOLUME /var/cache/portage/distfiles
|
|
|
|
# Volume for generated packages
|
|
VOLUME /var/cache/portage/packages
|
|
|
|
# The entrypoint…
|
|
COPY entrypoint.sh entrypoint.sh
|
|
|
|
# ... to be called
|
|
CMD /entrypoint.sh
|