# syntax=docker/dockerfile:latest ARG BASE_IMAGE FROM $BASE_IMAGE ARG PENV ARG BASE_IMAGE ARG KEEP ARG SYSADMIN_PW ARG LINUX_DISTRO=alpine ARG BUILD_DIR=/build WORKDIR $BUILD_DIR COPY .src/packages ./packages # PACKAGES RUN \ # --mount=type=cache,target=/var/cache/apt \ echo -e "\n ************************************************* \n"\ echo "****** Building Image from Base: $BASE_IMAGE; : Distro: $LINUX_DISTRO; *****"; \ echo " ---- running packages install script ---"; \ cd packages; /bin/sh ./packages.sh; cd ..; \ echo -e "\n********************************************************" # END PACKAGES COPY .src/init ./init # INITIALIZATION RUN echo -e "\n ************************************************* \n" \ echo "****** Initializing Image "; \ cd init; \ chmod -R +x .; \ pwd; ls -la; \ echo " ---- running init script ---"; \ /bin/bash ./init.sh; \ echo -e "\n ************* End Initialzation ************************" # END INITIALIZATION # default command CMD ["/bin/bash", "-l"] # default WORKDIR /opt