Protect again changes of unix permissions
authorCédric Ollivier <cedric.ollivier@orange.com>
Sun, 21 Aug 2016 10:22:42 +0000 (12:22 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sun, 21 Aug 2016 10:31:01 +0000 (12:31 +0200)
It adds chmods in Dockerfile to ensure python and bash scripts can be
executed.

Change-Id: I9d75e87fcb1eb2e6fa37039fa5a070ef21cf0efb
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/Dockerfile

index ce3f4ce..a14bdc4 100644 (file)
@@ -92,6 +92,9 @@ RUN pip install -r ${repos_dir}/functest/docker/requirements.pip
 RUN pip install -r ${repos_dir}/rally/requirements.txt
 RUN pip install -r ${repos_dir}/tempest/requirements.txt
 
+RUN find ${repos_dir}/functest -name "*.py" |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755
+RUN find ${repos_dir}/functest -name "*.sh" |xargs grep \#\! |cut -d\:  -f 1 |xargs chmod -c 755
+
 RUN /bin/bash ${repos_dir}/parser/tests/parser_install.sh ${repos_dir}
 RUN ${repos_dir}/rally/install_rally.sh --yes