From 876b85d3877821758d4abca982e398c277860e3e Mon Sep 17 00:00:00 2001
From: Andri Joos <andri@joos.io>
Date: Tue, 3 Dec 2024 21:45:05 +0100
Subject: [PATCH] add buildx task

---
 .vscode/tasks.json | 36 +++++++++++++++++++++++++++++++-----
 1 file changed, 31 insertions(+), 5 deletions(-)

diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index ed4a0aa..538bc8e 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -4,12 +4,38 @@
     "version": "2.0.0",
     "tasks": [
         {
-            "label": "docker build",
+            "label": "build",
             "command": "docker",
             "args": [
                 "build",
-                "."
-            ]
-        }
-    ]
+                "--build-arg",
+                "BASE_IMAGE_VERSION=${input:imageVersion}",
+                ".",
+            ],
+        },
+        {
+            "label": "buildx build",
+            "command": "docker",
+            "args": [
+                "buildx",
+                "build",
+                "--build-arg",
+                "BASE_IMAGE_VERSION=${input:imageVersion}",
+                "--platform",
+                "linux/arm64,linux/amd64",
+                ".",
+            ],
+        },
+    ],
+    "inputs": [
+        {
+            "id": "imageVersion",
+            "type": "pickString",
+            "description": "Choose base image version",
+            "options": [
+                "3.13.0",
+                "3.12.7",
+            ],
+        },
+    ],
 }
-- 
GitLab