colove/colove.py
jowj 83bcca7b67 add symlinks for initial run to work better.
specifically add new volume mount location dir and symlink  files to files that will be added to new volume mount location on docker run.
2018-05-03 13:13:37 -05:00

24 lines
536 B
Python

import os
import subprocess
import pdb
SCRIPTPATH = os.path.realpath(__file__)
SCRIPTDIR = os.path.dirname(SCRIPTPATH)
DOCKERDIR = os.path.join(SCRIPTDIR, 'docker')
COLOVEDIR = '/colove'
def dockerrun(
colovevolperms='rw', hostname='colove'):
args = [
'docker', 'run',
'--rm',
'--interactive',
'--tty',
'--volume', f'{SCRIPTDIR}:{COLOVEDIR}:{colovevolperms}',
'--hostname', hostname,
'colove:latest']
subprocess.run(args)
if __name__ == '__main__':
dockerrun()