Fix incompatibility with official image
@@ -4,8 +4,8 @@ WORKDIR /opt/pbm
COPY . .
RUN make install-k8s
-FROM registry.access.redhat.com/ubi7/ubi-minimal
-RUN microdnf update && microdnf clean all
+FROM registry.access.redhat.com/ubi8/ubi-minimal
+RUN microdnf update -y && microdnf clean all
LABEL name="Percona Backup for MongoDB" \
vendor="Percona" \
@@ -16,16 +16,6 @@ LABEL name="Percona Backup for MongoDB" \
COPY LICENSE /licenses/
-# kubectl needed for Percona Operator for PSMDB
-ENV KUBECTL_VERSION=v1.19.12
-ENV KUBECTL_MD5SUM=7c6a25afdec07da2cf1e1c1caf9e4381
-RUN curl -Lf -o /usr/bin/kubectl \
- https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl \
- && chmod +x /usr/bin/kubectl \
- && echo "${KUBECTL_MD5SUM} /usr/bin/kubectl" | md5sum -c - \
- && curl -Lf -o /licenses/LICENSE.kubectl \
- https://raw.githubusercontent.com/kubernetes/kubectl/master/LICENSE
-
# check repository package signature in secure way
RUN set -ex; \
export GNUPGHOME="$(mktemp -d)"; \
@@ -40,12 +30,14 @@ RUN set -ex; \
gpg --batch --export --armor 91E97D7C4A5E96F17F3E888F6A2FAEA2352C64E5 > ${GNUPGHOME}/RPM-GPG-KEY-EPEL-7; \
rpmkeys --import ${GNUPGHOME}/RPM-GPG-KEY-Percona ${GNUPGHOME}/RPM-GPG-KEY-CentOS-7 ${GNUPGHOME}/RPM-GPG-KEY-EPEL-7 ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
\
+ microdnf -y install findutils; \
curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \
rpmkeys --checksig /tmp/percona-release.rpm; \
rpm -i /tmp/percona-release.rpm; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
- percona-release enable psmdb-42 release
+ percona-release setup psmdb-50; \
+ percona-release enable psmdb-50 release
RUN set -ex; \
curl -Lf -o /tmp/jq.rpm https://download.fedoraproject.org/pub/epel/7/x86_64/Packages/j/jq-1.6-2.el7.x86_64.rpm; \
@@ -57,7 +49,7 @@ RUN set -ex; \
RUN microdnf install percona-server-mongodb-shell
-COPY --from=0 /go/bin/pbm /go/bin/pbm-agent /go/bin/pbm-agent-entrypoint /go/bin/pbm-speed-test /usr/local/bin/
+COPY --from=0 /go/bin/pbm /go/bin/pbm-agent /go/bin/pbm-agent-entrypoint /go/bin/pbm-speed-test /usr/bin/
COPY ./docker/start-agent.sh /start-agent.sh
USER nobody
