Skip to content

Commit

Permalink
RPM packages are installed with yum and DEB packages with dpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
SubhedarV authored Sep 16, 2024
1 parent 65b9bc4 commit f354b8a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ fi
COPY ${PACKAGE_FILE} /tmp/
RUN if [ "${PACKAGE_FILE##*.}" = "rpm" ]; then \
echo "Installing RPM package: ${PACKAGE_FILE}" && \
yum install -y /tmp/${PACKAGE_FILE} && \
rpm -ql $(rpm -q --whatprovides /tmp/${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 && \
dpkg-query -L $(dpkg -f /tmp/${PACKAGE_FILE} Package); \
dpkg -i /tmp/${PACKAGE_FILE} || apt-get install -f -y; \
fi && \
rm -f /tmp/${PACKAGE_FILE}

Expand Down

0 comments on commit f354b8a

Please sign in to comment.