Skip to content
Snippets Groups Projects
Commit 770c342d039c authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:pencil: instead of sudo, use a busybox to chmod

the user is a member of docker group is already a prerequisite
parent 49d2a9f778e3
No related branches found
No related tags found
No related merge requests found
......@@ -267,4 +267,5 @@
else:
logging.debug('Creating volume %s', data_volume_name)
volume = docker_client.create_volume(name=data_volume_name)
mount_opts = 'source={},target=/mnt/data'.format(data_volume_name)
# make sure the permission in the volume are correct
......@@ -270,8 +271,7 @@
# make sure the permission in the volume are correct
# TODO replace by something cleaner...
mount_point = volume['Mountpoint']
call(['sudo', 'chmod', '777', mount_point])
options.append('source={},target=/mnt/data'.format(data_volume_name))
# TODO replace by something cleaner if possible
call(['docker', 'run', '--rm', '--mount', mount_opts, 'busybox', 'chmod', '777', '/mnt/data'])
options.append(mount_opts)
arg.append('--data-dir /mnt/data')
else:
logging.debug('No data volume for this odoo version')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment