2023-03-25 11:27:22 -07:00
|
|
|
# syntax=docker/dockerfile:latest
|
2022-10-20 18:48:17 -07:00
|
|
|
ARG BASE_IMAGE
|
|
|
|
FROM $BASE_IMAGE
|
2023-03-25 11:27:22 -07:00
|
|
|
ARG PENV
|
2023-01-17 11:53:24 -08:00
|
|
|
ARG BASE_IMAGE
|
|
|
|
ARG KEEP
|
2023-01-21 22:22:41 -08:00
|
|
|
ARG SYSADMIN_PW
|
2022-10-20 18:48:17 -07:00
|
|
|
ARG LINUX_DISTRO=alpine
|
2023-01-22 15:02:36 -08:00
|
|
|
ARG BUILD_DIR=/build
|
|
|
|
WORKDIR $BUILD_DIR
|
2022-10-20 18:48:17 -07:00
|
|
|
|
2023-03-22 09:10:54 -07:00
|
|
|
COPY .src/packages ./packages
|
|
|
|
# PACKAGES
|
|
|
|
RUN \
|
|
|
|
# --mount=type=cache,target=/var/cache/apt \
|
|
|
|
echo -e "\n ************************************************* \n"\
|
2023-01-17 11:53:24 -08:00
|
|
|
echo "****** Building Image from Base: $BASE_IMAGE; : Distro: $LINUX_DISTRO; *****"; \
|
2023-03-22 09:10:54 -07:00
|
|
|
echo " ---- running packages install script ---"; \
|
|
|
|
cd packages; /bin/sh ./packages.sh; cd ..; \
|
2023-01-21 22:22:41 -08:00
|
|
|
echo -e "\n********************************************************"
|
2023-03-22 09:10:54 -07:00
|
|
|
# END PACKAGES
|
2023-01-21 22:22:41 -08:00
|
|
|
|
2023-03-22 09:10:54 -07:00
|
|
|
COPY .src/init ./init
|
|
|
|
|
|
|
|
# INITIALIZATION
|
2023-01-21 22:22:41 -08:00
|
|
|
RUN echo -e "\n ************************************************* \n" \
|
2023-03-22 09:10:54 -07:00
|
|
|
echo "****** Initializing Image "; \
|
|
|
|
cd init; \
|
2023-01-17 11:53:24 -08:00
|
|
|
chmod -R +x .; \
|
|
|
|
pwd; ls -la; \
|
2023-03-22 09:10:54 -07:00
|
|
|
echo " ---- running init script ---"; \
|
|
|
|
/bin/bash ./init.sh; \
|
|
|
|
echo -e "\n ************* End Initialzation ************************"
|
|
|
|
# END INITIALIZATION
|
2022-10-20 18:48:17 -07:00
|
|
|
|
2023-03-25 11:27:22 -07:00
|
|
|
# default command
|
2023-01-22 15:02:36 -08:00
|
|
|
CMD ["/bin/bash", "-l"]
|
2023-03-25 11:27:22 -07:00
|
|
|
# default
|
|
|
|
WORKDIR /opt
|
|
|
|
|
|
|
|
|