colove/colove.py

23 lines
540 B
Python
Raw Normal View History

2018-05-03 16:55:09 +00:00
import os
import subprocess
2018-05-03 16:55:09 +00:00
import pdb
2018-05-03 16:55:09 +00:00
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',
2018-05-03 16:55:09 +00:00
'--volume', f'{SCRIPTDIR}:{COLOVEDIR}:{colovevolperms}',
'--hostname', hostname,
'colove:latest']
subprocess.run(args)
if __name__ == '__main__':
dockerrun()