40 lines
1.0 KiB
Docker
40 lines
1.0 KiB
Docker
# syntax=docker/dockerfile:latest
|
|
ARG BASE_IMAGE
|
|
FROM $BASE_IMAGE
|
|
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 \
|
|
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
|
|
|
|
|