mirror of
https://github.com/openshift/community.okd.git
synced 2026-03-26 19:03:14 +00:00
Dockerfile now is properly set up to run tests in a rootless container (#11)
* Dockerfile now is properly set up to run tests in a rootless container * Keep docker as default
This commit is contained in:
committed by
GitHub
parent
ee21083985
commit
73522d3b53
@@ -1,14 +1,33 @@
|
||||
FROM registry.access.redhat.com/ubi8/ubi
|
||||
|
||||
RUN yum install -y make python3 python3-devel python3-pip python3-setuptools \
|
||||
ENV OPERATOR=/usr/local/bin/ansible-operator \
|
||||
USER_UID=1001 \
|
||||
USER_NAME=ansible-operator\
|
||||
HOME=/opt/ansible \
|
||||
ANSIBLE_LOCAL_TMP=/opt/ansible/tmp
|
||||
|
||||
RUN yum install -y \
|
||||
glibc-langpack-en \
|
||||
git \
|
||||
make \
|
||||
python3 \
|
||||
python3-devel \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
&& pip3 install --upgrade setuptools pip \
|
||||
&& pip3 install \
|
||||
openshift \
|
||||
ansible \
|
||||
molecule
|
||||
|
||||
WORKDIR /src
|
||||
COPY . /opt/ansible
|
||||
|
||||
COPY . /src
|
||||
WORKDIR /opt/ansible
|
||||
|
||||
USER 1001
|
||||
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+rw "${HOME}"
|
||||
|
||||
|
||||
USER ${USER_UID}
|
||||
|
||||
Reference in New Issue
Block a user