update dockerrun args to mount vol.

This commit is contained in:
jowj 2018-05-03 11:55:09 -05:00
parent 709ed22478
commit a3bc170f4b

View File

@ -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)