Skip to content

Commit

Permalink
/bin/bash to support [[
Browse files Browse the repository at this point in the history
  • Loading branch information
SubhedarV authored Sep 17, 2024
1 parent 26d2652 commit 65d294f
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ RUN echo "---- Installing Dependencies ----" && \
apt-get clean; \
fi

# Copy and install the package
COPY ${PACKAGE_FILE} /tmp/
RUN /bin/bash -c " \
echo '---- Installing RPM package: ${PACKAGE_FILE} ----'; \
yum install -y /tmp/${PACKAGE_FILE} && \
echo '---- Cleaning Up ----' && \
rm -f /tmp/${PACKAGE_FILE}"
# Copy and install the package
COPY ${PACKAGE_FILE} /tmp/
RUN if [[ "${PACKAGE_FILE}" == *.rpm ]]; then \
echo "Installing RPM package: ${PACKAGE_FILE}" && \
yum install -y /tmp/${PACKAGE_FILE}; \
else \
echo "Installing DEB package: ${PACKAGE_FILE}" && \
dpkg -i /tmp/${PACKAGE_FILE} || apt-get install -f -y; \
fi && \
rm -f /tmp/${PACKAGE_FILE}


# Enable Systemctl (if needed)
RUN echo "---- Setting up Systemctl Replacement ----" && \
Expand Down

0 comments on commit 65d294f

Please sign in to comment.