ARG STAGE1_TAG FROM nest/stage1/debug:${STAGE1_TAG} AS debug FROM nest/stage1:${STAGE1_TAG} ARG FACTER_build=stage2 ARG FACTER_emerge_default_opts ARG FACTER_makeopts ARG PROFILE # Merge debug files into image so all hosts have them COPY --from=debug / /usr/lib/debug/ RUN eix-sync -q # Switch to desired profile and make the base system consistent with it RUN eselect profile set "nest:${PROFILE}" RUN emerge --info RUN emerge -v --update --deep --newuse --with-bdeps=y @world # Configure the stage RUN puppet agent --test --runtimeout 0; [ $? -eq 2 ]