Merge pull request #2267 from bluewave-labs/feat/buildx-arm
feat: build multi-arch images for dist
This commit is contained in:
1 file changed
+5
-4
Vendored
+5
-4
@@ -11,11 +11,12 @@ declare -A services=(
|
|||||||
["bluewaveuptime/uptime_server"]="./docker/dist/server.Dockerfile"
|
["bluewaveuptime/uptime_server"]="./docker/dist/server.Dockerfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Loop through each service and build the corresponding image
|
|
||||||
for service in "${!services[@]}"; do
|
for service in "${!services[@]}"; do
|
||||||
docker build -f "${services[$service]}" -t "$service" .
|
docker buildx build \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
# Check if the build succeeded
|
-f "${services[$service]}" \
|
||||||
|
-t "$service" \
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Error building $service image. Exiting..."
|
echo "Error building $service image. Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in new issue
Block a user