Commit 50d6791a authored by Alexander Lercher's avatar Alexander Lercher

build individual images

parent ee159e16
...@@ -2,14 +2,16 @@ import os ...@@ -2,14 +2,16 @@ import os
import shutil import shutil
import sys import sys
# if len(sys.argv) != 2:
# raise Exception("Push to Docker Hub will not work, please provide username as argument")
DOCKER_COMPOSE_NAME = "Dockerfile" DOCKER_COMPOSE_NAME = "Dockerfile"
ROOT = './' ROOT = './'
SOURCEPATH = f'{ROOT}src/' SOURCEPATH = f'{ROOT}src/'
DOCKER_USERNAME = "alexx882" DOCKER_USERNAME = "alexx882"
p_image_name = None
if len(sys.argv) == 2:
# parameter contains image to build
p_image_name = sys.argv[1]
paths = [] paths = []
for r, _, f in os.walk(SOURCEPATH): for r, _, f in os.walk(SOURCEPATH):
for filename in f: for filename in f:
...@@ -21,6 +23,9 @@ command_args = [{'path': path, ...@@ -21,6 +23,9 @@ command_args = [{'path': path,
for path for path
in paths] in paths]
if p_image_name is not None:
command_args = [x for x in command_args if x['name']==p_image_name]
error:int = 0 error:int = 0
res_str = [] res_str = []
for command_arg in command_args: for command_arg in command_args:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment