gentoo-builder/Dockerfile

42 lines
960 B
Docker

FROM gentoo/stage3-amd64-hardened as base
RUN mkdir /usr/portage && emerge-webrsync
RUN mkdir /tmp/root && emerge -q --root=/tmp/root dev-util/catalyst
FROM gentoo/stage3-amd64-hardened
# Copy needed files
COPY --from=base /tmp/root/* /
#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
# Volume for downloaded distfiles
VOLUME /var/cache/portage/distfiles
# Volume for generated packages
VOLUME /var/cache/portage/packages
# Copy base specs.
COPY stage1.spec stage1.spec
COPY stage2.spec stage2.spec
COPY stage3.spec stage3.spec
# Copy Catalyst configuration
COPY catalyst.conf catalyst.conf
COPY catalystrc catalystrc
# The entrypoint…
COPY entrypoint.sh entrypoint.sh
# ... to be called
CMD /entrypoint.sh