Files
community.okd/ci/Dockerfile
Mike Graves c2f1d722dc Update ldap image in tests (#274)
* Update ldap image in tests

The bitnami openldap image we had been using is no longer being support
by them. It has been moved over to a bitnamilegacy namespace, but it's
not clear how long that will remain. We should find a better solution at
some point.

* Update versions in Dockerfile

The dockerfile was built around python3.9 which forced the use of
ansible 2.15. This updates the base image to ubi10 which uses python3.12
by default. The version of the oc/kubectl client package was updated to
4.20 as well.

* Try and make it work

* Remove backslash

* debug

* try and force 3.12

* use ubi9

* debug

* try adding packaging

* debug

* Lots of changes

* Add check for none

* Fix python version
2026-03-23 14:01:08 +00:00

44 lines
1.2 KiB
Docker

FROM registry.access.redhat.com/ubi9/ubi
ENV OPERATOR=/usr/local/bin/ansible-operator \
USER_UID=1001 \
USER_NAME=ansible-operator\
HOME=/opt/ansible \
ANSIBLE_LOCAL_TMP=/opt/ansible/tmp \
DOWNSTREAM_BUILD_PYTHON=python3.12
RUN yum install -y \
glibc-langpack-en \
git \
make \
python3.12 \
python3.12-devel \
python3.12-pip \
python3.12-setuptools \
gcc \
openldap-devel \
&& python3.12 -m pip install --no-cache-dir --upgrade setuptools pip \
&& python3.12 -m pip install --no-cache-dir \
kubernetes \
"ansible-core" \
"molecule" \
&& yum clean all \
&& rm -rf $HOME/.cache \
&& curl -L https://github.com/okd-project/okd/releases/download/4.20.0-okd-scos.17/openshift-client-linux-amd64-rhel9-4.20.0-okd-scos.17.tar.gz | tar -xz -C /usr/local/bin
# TODO: Is there a better way to install this client in ubi8?
COPY . /opt/ansible
WORKDIR /opt/ansible
RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd \
&& mkdir -p "${HOME}/.ansible/tmp" \
&& chown -R "${USER_UID}:0" "${HOME}" \
&& chmod -R ug+rwX "${HOME}" \
&& mkdir /go \
&& chown -R "${USER_UID}:0" /go \
&& chmod -R ug+rwX /go
USER ${USER_UID}