You've already forked docker_fresh
mirror of
https://github.com/1C-Company/docker_fresh.git
synced 2025-11-29 22:58:23 +02:00
initial commit
This commit is contained in:
25
modules/helper.py
Normal file
25
modules/helper.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import pathlib
|
||||
import os
|
||||
|
||||
sep = str(os.path.sep)
|
||||
this_path = str(pathlib.Path().absolute()) + sep
|
||||
distr_path = this_path + 'distr' + sep
|
||||
|
||||
def replace_sep(path):
|
||||
return path.replace('/', sep)
|
||||
|
||||
def new_docker_command(extra_path=None):
|
||||
command = []
|
||||
command.append('docker')
|
||||
command.append('run')
|
||||
command.append('--rm')
|
||||
command.append('-v')
|
||||
|
||||
if extra_path != None:
|
||||
current_distr_path = this_path + extra_path
|
||||
current_distr_path = current_distr_path.replace('/', sep)
|
||||
else:
|
||||
current_distr_path = distr_path
|
||||
|
||||
command.append(current_distr_path + ':/out_files')
|
||||
return command
|
||||
Reference in New Issue
Block a user