Skip to content

Commit 395dd4b

Browse files
authored
Merge pull request #117 from ApsOps/buildargs
Fix for #114
2 parents a22a448 + 0681d7e commit 395dd4b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

rootfs/deploy.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import docker
2+
import json
23
import os
34
import sys
45
import tarfile
@@ -104,7 +105,14 @@ def download_file(tar_path):
104105
registry = get_registry_name()
105106
imageName, imageTag = os.getenv('IMG_NAME').split(":", 1)
106107
repo = registry + "/" + os.getenv('IMG_NAME')
107-
stream = client.build(tag=repo, stream=True, decode=True, rm=True, pull=True, path='/app')
108+
stream = client.build(
109+
tag=repo,
110+
stream=True,
111+
decode=True,
112+
rm=True,
113+
pull=True,
114+
path='/app',
115+
buildargs=json.loads(os.getenv('DOCKER_BUILD_ARGS', '{}')))
108116
log_output(stream, True)
109117
print("Pushing to registry")
110118
stream = client.push(registry+'/'+imageName, tag=imageTag, stream=True)

0 commit comments

Comments
 (0)