summaryrefslogtreecommitdiff
path: root/molecule/default/Dockerfile.j2
blob: f45ea7d58e4e8837fb13c4090ba16e4c5e1724c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
{% endif %}

{% if item.image in ["centos:7"] %}
RUN yum install -y sudo libselinux-python && yum clean all
{% else %}
RUN yum install -y sudo python3-libselinux && yum clean all
{% endif %}

RUN adduser centos && \
    echo 'centos ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/90-centos && \
    chmod 440 /etc/sudoers.d/90-centos