Fix for running Molecule on Centos host
On Centos7.6 /dev/loop* device nodes are
created dynamically upon alocation (by default
there is no /dev/loop<N> device nodes) - this
has effect of failing to allocate those in
Docker container, even when run in privileged
mode.
Change-Id: If2c852de3a74ea7fe1df9f5c863f184b9bc13acb
Issue-ID: OOM-1774
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
diff --git a/ansible/roles/docker/molecule/default/molecule.yml b/ansible/roles/docker/molecule/default/molecule.yml
index 9a87184..7754d27 100644
--- a/ansible/roles/docker/molecule/default/molecule.yml
+++ b/ansible/roles/docker/molecule/default/molecule.yml
@@ -17,6 +17,7 @@
container: docker
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
+ - /dev:/dev:ro
provisioner:
name: ansible
lint:
diff --git a/ansible/test/images/docker/centos7/Dockerfile b/ansible/test/images/docker/centos7/Dockerfile
index b36d58c..67e3fb9 100644
--- a/ansible/test/images/docker/centos7/Dockerfile
+++ b/ansible/test/images/docker/centos7/Dockerfile
@@ -3,7 +3,7 @@
RUN yum -y update && yum clean all
RUN yum -y install openssh-server sudo openssh-clients \
- epel-release python-docker-py iproute
+ epel-release python-docker-py iproute e2fsprogs
RUN systemctl enable sshd.service
VOLUME ["/run"]