Skip to content

Commit

Permalink
Reduce docker image size
Browse files Browse the repository at this point in the history
  • Loading branch information
evanc577 committed Apr 29, 2024
1 parent fff102e commit 9f6753e
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,18 @@ RUN cargo build --release
##########
FROM almalinux:9

RUN dnf install -y epel-release
RUN curl -L https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm \
-o /tmp/rpmfusion-free.rpm && \
rpm -i /tmp/rpmfusion-free.rpm && rm /tmp/rpmfusion-free.rpm
RUN curl -L https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm \
-o /tmp/rpmfusion-nonfree.rpm && \
rpm -i /tmp/rpmfusion-nonfree.rpm && rm /tmp/rpmfusion-nonfree.rpm
RUN dnf install -y 'dnf-command(config-manager)'
RUN dnf config-manager --enable crb
RUN dnf install -y ffmpeg python3 python3-pip
RUN pip3 install ytmusicapi
RUN dnf install -y epel-release && \
curl -L https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm \
-o /tmp/rpmfusion-free.rpm && \
rpm -i /tmp/rpmfusion-free.rpm && rm /tmp/rpmfusion-free.rpm && \
curl -L https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm \
-o /tmp/rpmfusion-nonfree.rpm && \
rpm -i /tmp/rpmfusion-nonfree.rpm && rm /tmp/rpmfusion-nonfree.rpm && \
dnf install -y 'dnf-command(config-manager)' && \
dnf config-manager --enable crb && \
dnf install -y ffmpeg python3 python3-pip && \
pip3 install ytmusicapi && \
dnf clean all && pip cache purge

WORKDIR /insomnia_bot
COPY --from=builder /insomnia_bot/target/release/insomnia-bot ./
Expand Down

0 comments on commit 9f6753e

Please sign in to comment.