42 lines
1006 B
Docker
42 lines
1006 B
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 <<eot
|
|
echo -e "\n ************************************************* \n"
|
|
echo "Building Image from Base: $BASE_IMAGE"
|
|
echo "Distro: $LINUX_DISTRO; *****"
|
|
echo " ---- running packages install script ---"
|
|
cd packages; /bin/sh ./packages.sh; cd ..
|
|
echo -e "\n********************************************************"
|
|
eot
|
|
# 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
|
|
|
|
|