From a3bc170f4bdc588b9bb76c69f15de2cbb9ca5dc8 Mon Sep 17 00:00:00 2001 From: jowj Date: Thu, 3 May 2018 11:55:09 -0500 Subject: [PATCH] update dockerrun args to mount vol. --- colove.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/colove.py b/colove.py index 29ae03b..d457503 100644 --- a/colove.py +++ b/colove.py @@ -1,12 +1,21 @@ +import os import subprocess +import pdb -def dockerrun(): +SCRIPTPATH = os.path.realpath(__file__) +SCRIPTDIR = os.path.dirname(SCRIPTPATH) +DOCKERDIR = os.path.join(SCRIPTDIR, 'docker') +COLOVEDIR = '/home/colove' + +def dockerrun( + colovevolperms='rw', hostname='colove'): args = [ 'docker', 'run', '--rm', '--interactive', '--tty', - '--mount', 'source=agares,target=/colove', + '--volume', f'{SCRIPTDIR}:{COLOVEDIR}:{colovevolperms}', + '--hostname', hostname, 'colove:latest'] subprocess.run(args)