5

我想在这里使用这个 Dockerfile - https://github.com/ForgeRock/forgeops/blob/release/6.5.0/docker/util/Dockerfile

并更改旧版本,即 Alpine linux(见下文):

FROM alpine:3.7

...

RUN apk add --update ca-certificates \
 && apk add --update -t deps curl\
 && curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \
 && chmod +x /usr/local/bin/kubectl \
 && apk del --purge deps \
 && apk add --update jq su-exec unzip curl bash openldap-clients \
 && rm /var/cache/apk/* \
 && mkdir -p $FORGEROCK_HOME \
 && addgroup -g 11111 forgerock \
 && adduser -s /bin/bash -h "$FORGEROCK_HOME" -u 11111 -D -G forgerock forgerock

将其更改为脱离 RHEL 7(我的更改如下)

FROM ubi7-stigd:7.6

...

# Install epel, so we can install jq later
RUN rpm --import http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 \
&& yum install -y --disableplugin=subscription-manager https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 

# Install other stuff
RUN yum -y --disableplugin=subscription-manager update \
 && yum install -y --disableplugin=subscription-manager jq su-exec unzip curl bash openldap-clients ca-certificates deps \
 && curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \
 && chmod +x /usr/local/bin/kubectl \
 && mkdir -p $FORGEROCK_HOME \
 && groupadd -g 11111 forgerock \
 && useradd -m -s /bin/bash -d "$FORGEROCK_HOME" -u 11111 -g forgerock -G root forgerock

容器构建得很好(尽管它抱怨无法找到“su-exec”和“deps”)。但是,当我将此图像上传到我的 OpenShift 并通过 OpenAM pod 运行它时,容器无法启动,10 分钟后超时。事件显示容器已启动,日志仅显示 2 行,表示 10 分钟后超时。

有谁知道可能是什么问题?

4

1 回答 1

0

我需要安装“nc”包,因为其中一个 .sh 文件使用 nc。

于 2019-08-14T15:53:11.867 回答