Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce percona-xtrabackup docker image size #758

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions percona-xtrabackup-2.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ RUN set -ex; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
#microdnf -y module disable mysql perl-DBD-MySQL; \
percona-release enable tools testing
percona-release enable tools testing; \
microdnf clean all; \
rm -rf /var/cache/dnf /var/cache/yum

RUN set -ex; \
curl -Lf -o /tmp/libev.rpm https://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/libev-4.24-6.el8.x86_64.rpm; \
Expand All @@ -42,4 +44,4 @@ RUN set -ex; \

VOLUME [ "/backup" ]

CMD ["/usr/bin/xtrabackup"]
CMD ["/usr/bin/xtrabackup"]
10 changes: 7 additions & 3 deletions percona-xtrabackup-8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ RUN set -ex; \
percona-release disable all; \
#percona-release setup -y ps-80; \
percona-release enable ps-80 testing; \
percona-release enable tools testing
percona-release enable tools testing; \
microdnf clean all; \
rm -rf /var/cache/dnf /var/cache/yum

RUN set -ex; \
microdnf -y install \
tar \
shadow-utils
shadow-utils; \
microdnf clean all; \
rm -rf /var/cache/dnf /var/cache/yum

# create mysql user/group before mysql installation
RUN groupadd -g 1001 mysql; \
Expand Down Expand Up @@ -63,4 +67,4 @@ RUN install -d -o 1001 -g 0 -m 0775 /backup
VOLUME [ "/backup" ]
USER 1001

CMD ["/usr/bin/xtrabackup"]
CMD ["/usr/bin/xtrabackup"]