![如何在 ubi9 docker 镜像上安装 samba 客户端?](https://linux22.com/image/788465/%E5%A6%82%E4%BD%95%E5%9C%A8%20ubi9%20docker%20%E9%95%9C%E5%83%8F%E4%B8%8A%E5%AE%89%E8%A3%85%20samba%20%E5%AE%A2%E6%88%B7%E7%AB%AF%EF%BC%9F.png)
我正在使用Red Hat ubi9 openjdk17 映像。
我正在尝试安装 samba 和 samba-client,microdnf install samba-client
但是出现了以下错误:
error: No package matches 'samba-client'
我知道这可能是图像库的问题,因为它是一个非常小的图像,有没有办法在不改变图像的情况下解决这个问题?
Dockerfile:
FROM registry.access.redhat.com/ubi9/openjdk-17:1.15-2
USER root
# Download certificate and update ca-trust
RUN curl --output /etc/pki/ca-trust/source/anchors/mycert.crt \
--create-dirs http://orgurl/rootcacert.pem \
&& update-ca-trust enable; update-ca-trust extract
# Update packages and install samba-related packages
RUN microdnf update -y && \
microdnf install -y samba-client && \
microdnf clean all
(ARGs and ENV variables...)
ENV LANGUAGE='en_US:en'
# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/
COPY --chown=185 target/quarkus-app/*.jar /deployments/
COPY --chown=185 target/quarkus-app/app/ /deployments/app/
COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/
COPY --chown=185 privateKey.pem /deployments/app/privateKey.pem
EXPOSE 8080
USER 185
ENV AB_JOLOKIA_OFF=""
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"