<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Buildx on dev.endevour</title><link>https://devendevour.iankulin.com/tags/buildx/</link><description>Recent content in Buildx on dev.endevour</description><generator>Hugo</generator><language>en-AU</language><lastBuildDate>Mon, 20 Nov 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://devendevour.iankulin.com/tags/buildx/index.xml" rel="self" type="application/rss+xml"/><item><title>Building Docker images for multiple architectures</title><link>https://devendevour.iankulin.com/building-docker-images-for-multiple-architectures/</link><pubDate>Mon, 20 Nov 2023 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/building-docker-images-for-multiple-architectures/</guid><description>&lt;p&gt;&lt;img src="https://devendevour.iankulin.com/images/featured-image-shipping-containers.jpeg.webp" alt="" class="img-responsive"&gt; &lt;/p&gt;
&lt;p&gt;My little mdserver app has been a good way for me to start experimenting with the the devops side of things, especially building for Docker. Since I wanted to make the Docker image available for ARM Linux &amp;amp; x86 Linux I had a janky shell script that looked like this:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;#!/bin/bash

# Extract the version number from package.json using jq
VERSION=$(jq -r .version package.json)

docker build --platform linux/amd64 -t iankulin/mdserver:$VERSION -t iankulin/mdserver:latest .
docker build --platform linux/arm64 -t iankulin/mdserver:arm64-$VERSION -t iankulin/mdserver:arm64-latest .

docker push iankulin/mdserver:arm64-$VERSION 
docker push iankulin/mdserver:arm64-latest 

docker push iankulin/mdserver:$VERSION
docker push iankulin/mdserver:latest 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So I&amp;rsquo;d build two different versions, and use the tags to separate them. In the registry it&amp;rsquo;d look like this:&lt;/p&gt;</description></item></channel></rss>