diff options
author | 2019-04-17 19:42:59 +0300 | |
---|---|---|
committer | 2019-05-16 11:39:26 +0000 | |
commit | 8fd23141ffc7dd2f3c02b62e8fed1ff8364319b0 (patch) | |
tree | 0e3a9df5693f50f0cee9e10d406a75ce7fa0ba72 /ansible/roles/application/molecule/default/Dockerfile.j2 | |
parent | 0b66903e11a12cbdaf8db9f03fa3da96c375a0af (diff) |
Molecule tests for application role.
Issue-ID: OOM-1812
Change-Id: Ifb6f5a10afb4014b20be77a4141371e561d346ce
Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'ansible/roles/application/molecule/default/Dockerfile.j2')
-rw-r--r-- | ansible/roles/application/molecule/default/Dockerfile.j2 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ansible/roles/application/molecule/default/Dockerfile.j2 b/ansible/roles/application/molecule/default/Dockerfile.j2 new file mode 100644 index 00000000..e6aa95d3 --- /dev/null +++ b/ansible/roles/application/molecule/default/Dockerfile.j2 @@ -0,0 +1,14 @@ +# Molecule managed + +{% if item.registry is defined %} +FROM {{ item.registry.url }}/{{ item.image }} +{% else %} +FROM {{ item.image }} +{% endif %} + +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ + elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \ + elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ + elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \ + elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ + elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi |