1
0
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:
WizaXxX
2020-04-05 16:06:36 +03:00
parent 1b1cd21b4e
commit 3c90490264
18 changed files with 547 additions and 0 deletions

25
modules/helper.py Normal file
View 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