uci-docker-build/Dockerfile

38 lines
1.1 KiB
Docker

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 \
# --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
VOLUME [ "/data", "/opt", "/shell, /home/sysadmin" ]
WORKDIR /opt
# ENTRYPOINT ["entrypoint.sh"]
CMD ["/bin/bash", "-l"]