Skip to content

Commit

Permalink
Merge branch 'release-2.12.x' into TASK-5855
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Apr 1, 2024
2 parents 1dd89df + a120256 commit c5b7de8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docker/docker-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
parser.add_argument('--images', help="comma separated list of images to be made, e.g. app", default="app")
parser.add_argument('--tag', help="the tag for this code, e.g. v2.0.0")
parser.add_argument('--build-folder', help="the location of the build folder, if not default location")
parser.add_argument('--platform', help="specify the target platform for the build image, e.g. 'linux/amd64'", default="linux/amd64")
parser.add_argument('--username', help="credentials for dockerhub (REQUIRED if deleting from DockerHub)")
parser.add_argument('--password', help="credentials for dockerhub (REQUIRED if deleting from DockerHub)")

Expand Down Expand Up @@ -81,7 +82,7 @@ def build():
site = "build/custom-sites" + "/" + image

print(shell_colors['blue'] + "Building " + organisation + "/iva-" + image + ":" + tag + " ..." + shell_colors['reset'])
run("docker build -t " + organisation + "/iva-" + image + ":" + tag + " --build-arg SITE=" + site + " -f " + build_folder + "/docker/iva-app/Dockerfile " + build_folder)
run("docker build --platform " + platform + " -t " + organisation + "/iva-" + image + ":" + tag + " --build-arg SITE=" + site + " -f " + build_folder + "/docker/iva-app/Dockerfile " + build_folder)

def tag_latest(image):
latest_tag = os.popen(("curl -s https://registry.hub.docker.com/v1/repositories/" + organisation + "/iva-" + image + "/tags"
Expand Down Expand Up @@ -163,6 +164,11 @@ def delete():
else:
images = args.images.split(",")

# 5. init platform: set platform to default value if not set
if args.platform is not None:
platform = args.platform
else:
platform = "linux/amd64"

## Execute the action
if args.action == "build":
Expand Down

0 comments on commit c5b7de8

Please sign in to comment.